diff options
author | Aleksi Lindeman <0xdec05eba@gmail.com> | 2018-04-14 19:45:15 +0200 |
---|---|---|
committer | Aleksi Lindeman <0xdec05eba@gmail.com> | 2018-04-14 19:45:24 +0200 |
commit | 6e4d46f8cf911b82a10e8cd25b65fcc421bbc712 (patch) | |
tree | 3d6ee838990389d920df934e20aea1700052ce74 /src/OwnedMemory.cpp | |
parent | 9c22be3516d5067b98b06271e2f3545713ff6099 (diff) |
Store database storage to files, also loading
Diffstat (limited to 'src/OwnedMemory.cpp')
-rw-r--r-- | src/OwnedMemory.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/OwnedMemory.cpp b/src/OwnedMemory.cpp new file mode 100644 index 0000000..1d53faf --- /dev/null +++ b/src/OwnedMemory.cpp @@ -0,0 +1,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; + } +} |