aboutsummaryrefslogtreecommitdiff
path: root/src/OwnedMemory.cpp
blob: 1d53fafc9e589c741c603d6477b2a9cfee5f5ea5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "../include/odhtdb/OwnedMemory.hpp"
#include <cstdlib>

namespace odhtdb
{
    OwnedMemory::OwnedMemory(OwnedMemory &&other)
    {
        data = other.data;
        size = other.size;
        
        other.data = nullptr;
        other.size = 0;
    }
    
    OwnedMemory::~OwnedMemory()
    {
        free(data);
        data = nullptr;
        size = 0;
    }
}