sanitize shared_ptr

This commit is contained in:
crypto-ape 2019-04-02 12:31:56 +02:00
parent bf63236e09
commit e82b327605

View file

@ -46,7 +46,7 @@ namespace fc {
shared_ptr( shared_ptr&& p )
:_ptr(p._ptr){ p._ptr = nullptr; }
~shared_ptr() { if( nullptr != _ptr ) { _ptr->release(); } }
~shared_ptr() { if( nullptr != _ptr ) { _ptr->release(); _ptr = nullptr; } }
shared_ptr& reset( T* v = nullptr, bool inc = false ) {
if( v == _ptr ) return *this;