wxCritSection change to accomodate mem checking system (even better :-)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1772 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 1999-02-23 23:24:50 +00:00
parent 00fdc89da8
commit f7c44a6a16

View File

@ -262,8 +262,7 @@ wxCriticalSection::wxCriticalSection()
wxCriticalSection::~wxCriticalSection()
{
if ( m_critsect )
delete m_critsect;
wxASSERT_MSG( !m_critsect, "Forgot to Leave() critical section" );
}
void wxCriticalSection::Enter()
@ -278,6 +277,9 @@ void wxCriticalSection::Leave()
wxCHECK_RET( m_critsect, "Leave() without matching Enter()" );
::LeaveCriticalSection(*m_critsect);
delete m_critsect;
m_critsect = NULL;
}
// ----------------------------------------------------------------------------