From 70c844ddfbe7e1eacf2e7f2d3db69dbfe7361e4a Mon Sep 17 00:00:00 2001 From: "Leila F. Rahman" Date: Sat, 24 Sep 2022 13:25:06 +0200 Subject: [PATCH] Fix the release function in the ValuePtr class (#4490) --- lib/valueptr.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/valueptr.h b/lib/valueptr.h index 1c4e6553d..45ca7d94e 100644 --- a/lib/valueptr.h +++ b/lib/valueptr.h @@ -53,8 +53,11 @@ public: } ValuePtr(ValuePtr&& rhs) : mPtr(std::move(rhs.mPtr)), mClone(std::move(rhs.mClone)) {} - pointer release() { - return mPtr.release(); + /** + * Releases the shared_ptr's ownership of the managed object using the .reset() function + */ + void release() { + mPtr.reset(); } T* get() NOEXCEPT {