aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-01-17 01:49:37 +0800
committercrupest <crupest@outlook.com>2022-01-17 01:49:37 +0800
commit1d929ee2e71e8e18490ed1266175833e6ad5c609 (patch)
tree21ff8f4ff33b4bc570e3adc99f54a972bfa23dbd /src/common
parent570e95f4551385a81eb2cf6f2e386e3b0cb291a8 (diff)
downloadcru-1d929ee2e71e8e18490ed1266175833e6ad5c609.tar.gz
cru-1d929ee2e71e8e18490ed1266175833e6ad5c609.tar.bz2
cru-1d929ee2e71e8e18490ed1266175833e6ad5c609.zip
...
Diffstat (limited to 'src/common')
-rw-r--r--src/common/io/MemoryStream.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/io/MemoryStream.cpp b/src/common/io/MemoryStream.cpp
index bd561f5d..481ed962 100644
--- a/src/common/io/MemoryStream.cpp
+++ b/src/common/io/MemoryStream.cpp
@@ -1,6 +1,12 @@
#include "cru/common/io/MemoryStream.hpp"
namespace cru::io {
+MemoryStream::~MemoryStream() {
+ if (release_func_) {
+ release_func_(buffer_, size_);
+ }
+}
+
bool MemoryStream::CanSeek() { return true; }
Index MemoryStream::Tell() { return position_; }