aboutsummaryrefslogtreecommitdiff
path: root/src/OwnedMemory.cpp
blob: ba18ec193fb5f97d8db7e74b9def9cee5bfbe277 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#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);
    }
}