// Purpose: Shared pointer based on the counted_ptr<> template, which
// is in the public domain
// Author: Robert Roebling, Yonat Sharon
-// 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;