From 74e4246565ba5814a92ed9f84b13b17226f219d1 Mon Sep 17 00:00:00 2001 From: Determinant Date: Sun, 16 Jun 2019 23:24:49 -0400 Subject: do not free the moved pointer for C API; misc changes --- src/stream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/stream.cpp') diff --git a/src/stream.cpp b/src/stream.cpp index 1d88785..13ee98f 100644 --- a/src/stream.cpp +++ b/src/stream.cpp @@ -51,7 +51,7 @@ bool datastream_assign_by_copy(datastream_t *dst, const datastream_t *src) { bool datastream_assign_by_move(datastream_t *dst, datastream_t *_moved_src) { try { *dst = std::move(*_moved_src); - delete _moved_src; + //delete _moved_src; } catch (...) { return false; } return true; } @@ -108,7 +108,7 @@ uint256_t *datastream_get_hash(const datastream_t *self) { bytearray_t *bytearray_new_moved_from_datastream(datastream_t *_moved_src) { try { auto res = new bytearray_t(std::move(*_moved_src)); - delete _moved_src; + //delete _moved_src; return res; } catch (...) { return nullptr; -- cgit v1.2.3