clean DFB event buffer on shutdown

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2006-09-30 19:22:40 +00:00
parent 746146e0e3
commit e48a305514
3 changed files with 10 additions and 4 deletions

View File

@@ -39,12 +39,13 @@ protected:
private: private:
static void InitBuffer(); static void InitBuffer();
static void CleanUp();
friend class wxApp; // calls CleanUp() and WakeUp()
private: private:
static wxIDirectFBEventBufferPtr ms_buffer; static wxIDirectFBEventBufferPtr ms_buffer;
friend class wxApp; // calls WakeUp()
DECLARE_NO_COPY_CLASS(wxEventLoop) DECLARE_NO_COPY_CLASS(wxEventLoop)
}; };

View File

@@ -57,6 +57,7 @@ void wxApp::CleanUp()
{ {
wxAppBase::CleanUp(); wxAppBase::CleanUp();
wxEventLoop::CleanUp();
wxIDirectFB::CleanUp(); wxIDirectFB::CleanUp();
} }

View File

@@ -52,6 +52,12 @@ void wxEventLoop::InitBuffer()
ms_buffer = wxIDirectFB::Get()->CreateEventBuffer(); ms_buffer = wxIDirectFB::Get()->CreateEventBuffer();
} }
/* static */
void wxEventLoop::CleanUp()
{
ms_buffer.Reset();
}
/* static */ /* static */
wxIDirectFBEventBufferPtr wxEventLoop::GetDirectFBEventBuffer() wxIDirectFBEventBufferPtr wxEventLoop::GetDirectFBEventBuffer()
{ {
@@ -125,8 +131,6 @@ void wxEventLoop::OnNextIteration()
#endif #endif
} }
#warning "FIXME: cleanup wxEventLoop::ms_buffer before exiting"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// DirectFB -> wxWidgets events translation // DirectFB -> wxWidgets events translation