Fix SharedPtr commit bug again

This commit is contained in:
Vinnie Falco
2013-09-06 21:18:57 -07:00
parent 63b0a1c9e0
commit 16113e783f

View File

@@ -225,7 +225,7 @@ public:
} }
private: private:
// Acquire a reference to u for the caller if not null. // Acquire a reference to u for the caller.
// //
template <class U> template <class U>
static T* acquire (U* u) noexcept static T* acquire (U* u) noexcept
@@ -235,12 +235,11 @@ private:
return u; return u;
} }
// Release a reference to t if not null. static void release (T* t)
//
static void release (T* t) noexcept
{ {
if (t != nullptr) if (t != nullptr)
t->decReferenceCount (); if (t->decReferenceCount (false))
ContainerDeletePolicy <T>::destroy (t);
} }
// Swap ownership of the currently referenced object. // Swap ownership of the currently referenced object.