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:
parent
1d13860d12
commit
5bc174ffce
1 changed files with 15 additions and 0 deletions
|
@ -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 )
|
||||
|
|
Loading…
Add table
Reference in a new issue