// Purpose: Shared pointer based on the counted_ptr<> template, which
// is in the public domain
// Author: Robert Roebling, Yonat Sharon
-// RCS-ID: $Id: object.h 47254 2007-07-09 10:09:52Z VS $
+// RCS-ID: $Id$
// Copyright: Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
{
if (m_ref)
{
- wxAtomicDec( m_ref->m_count );
- if (m_ref->m_count == 0)
+ if (!wxAtomicDec( m_ref->m_count ))
{
delete m_ref->m_ptr;
delete m_ref;