Added destructor to TwoRefCounts.

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@815 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
rich_sposato 2007-03-01 01:23:48 +00:00
parent 1d13860d12
commit 5bc174ffce

View file

@ -57,6 +57,21 @@ TwoRefCounts::TwoRefCounts( const void * p, bool strong )
// ----------------------------------------------------------------------------
TwoRefCounts::~TwoRefCounts( void )
{
if ( m_counts == NULL )
{
return;
}
if ( !m_counts->HasStrongPointer() && !m_counts->HasWeakPointer() )
{
SmallObject<>::operator delete ( m_counts,
sizeof(Loki::Private::TwoRefCountInfo) );
}
}
// ----------------------------------------------------------------------------
void TwoRefCounts::Increment( bool strong )
{
if ( strong )