git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45030
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#endif
#include "wx/evtloop.h"
#endif
#include "wx/evtloop.h"
+#include "wx/ptr_scpd.h"
#ifndef WX_PRECOMP
#include "wx/app.h"
#ifndef WX_PRECOMP
#include "wx/app.h"
// wxEventLoop implementation
// ============================================================================
// wxEventLoop implementation
// ============================================================================
+wxDEFINE_TIED_SCOPED_PTR_TYPE(wxEventLoopImpl)
+
// ----------------------------------------------------------------------------
// wxEventLoop running and exiting
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// wxEventLoop running and exiting
// ----------------------------------------------------------------------------
wxEventLoopActivator activate(this);
wxEventLoopActivator activate(this);
- m_impl = new wxEventLoopImpl;
+ wxEventLoopImplTiedPtr impl(&m_impl, new wxEventLoopImpl);
- int exitcode = m_impl->GetExitCode();
- delete m_impl;
- m_impl = NULL;
-
- return exitcode;
+ return m_impl->GetExitCode();
}
void wxEventLoop::Exit(int rc)
}
void wxEventLoop::Exit(int rc)