reuse wxObjectRefData for various ref-counted classes (closes #10886)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -163,7 +163,7 @@ void wxVariant::Ref(const wxVariant& clone)
|
||||
if ( clone.m_data )
|
||||
{
|
||||
m_data = clone.m_data;
|
||||
m_data->m_count++;
|
||||
m_data->IncRef();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ void wxVariant::UnRef()
|
||||
{
|
||||
if ( m_data )
|
||||
{
|
||||
wxASSERT_MSG( m_data->m_count > 0, _T("invalid ref data count") );
|
||||
wxASSERT_MSG( m_data->GetRefCount() > 0, _T("invalid ref data count") );
|
||||
|
||||
m_data->DecRef();
|
||||
m_data = NULL;
|
||||
|
Reference in New Issue
Block a user