// wxEventLoop running and exiting
// ----------------------------------------------------------------------------
-wxEventLoop *wxEventLoopBase::ms_activeLoop = NULL;
-
wxEventLoop::~wxEventLoop()
{
wxASSERT_MSG( !m_impl, _T("should have been deleted in Run()") );
m_impl = new wxEventLoopImpl;
- wxEventLoop *oldLoop = ms_activeLoop;
- ms_activeLoop = this;
+ wxEventLoopActivator activate(this);
for ( ;; )
{
delete m_impl;
m_impl = NULL;
- ms_activeLoop = oldLoop;
-
return exitcode;
}