Fixed bug 1668356 by making dtor inline and empty, and changing StrongPtr dtor.

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@818 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
rich_sposato 2007-03-07 00:28:17 +00:00
parent c95d4ccc74
commit dcf9d7f1d8

View file

@ -561,7 +561,11 @@ protected:
Increment( strong );
}
~TwoRefCounts( void );
/** The destructor does not need to do anything since the call to
ZapPointer inside StrongPtr::~StrongPtr will do the cleanup which
this dtor would have done.
*/
inline ~TwoRefCounts( void ) {}
inline bool Release( bool strong )
{
@ -657,6 +661,12 @@ protected:
Increment( strong );
}
/** The destructor does not need to do anything since the call to
ZapPointer inside StrongPtr::~StrongPtr will do the cleanup which
this dtor would have done.
*/
inline ~LockableTwoRefCounts( void ) {}
inline void Lock( void ) const
{
m_counts->Lock();
@ -1009,9 +1019,9 @@ public:
// undefined behavior. Therefore, this must get pointer before
// zapping it, and then delete the temp pointer.
T * p = GetPointer();
OP::ZapPointer();
if ( p != 0 )
{
OP::ZapPointer();
DP::Delete( p );
}
}