diff options
Diffstat (limited to 'common/intrusive_ptr.h')
-rw-r--r-- | common/intrusive_ptr.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/intrusive_ptr.h b/common/intrusive_ptr.h index 595c831d..cc82dea5 100644 --- a/common/intrusive_ptr.h +++ b/common/intrusive_ptr.h @@ -80,11 +80,11 @@ public: T* operator->() const noexcept { return mPtr; } T* get() const noexcept { return mPtr; } - void reset() noexcept + void reset(T *ptr=nullptr) noexcept { if(mPtr) mPtr->release(); - mPtr = nullptr; + mPtr = ptr; } T* release() noexcept |