From: Václav Slavík Date: Sat, 30 Sep 2006 19:22:40 +0000 (+0000) Subject: clean DFB event buffer on shutdown X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e48a3055145e5d3f77b17383ed7521585ea7391d?ds=inline clean DFB event buffer on shutdown git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/dfb/evtloop.h b/include/wx/dfb/evtloop.h index 11366e70a3..cf77e26c13 100644 --- a/include/wx/dfb/evtloop.h +++ b/include/wx/dfb/evtloop.h @@ -39,12 +39,13 @@ protected: private: static void InitBuffer(); + static void CleanUp(); + + friend class wxApp; // calls CleanUp() and WakeUp() private: static wxIDirectFBEventBufferPtr ms_buffer; - friend class wxApp; // calls WakeUp() - DECLARE_NO_COPY_CLASS(wxEventLoop) }; diff --git a/src/dfb/app.cpp b/src/dfb/app.cpp index ea4764ccbc..fc5357d91f 100644 --- a/src/dfb/app.cpp +++ b/src/dfb/app.cpp @@ -57,6 +57,7 @@ void wxApp::CleanUp() { wxAppBase::CleanUp(); + wxEventLoop::CleanUp(); wxIDirectFB::CleanUp(); } diff --git a/src/dfb/evtloop.cpp b/src/dfb/evtloop.cpp index 78bca48df8..52b940c9f4 100644 --- a/src/dfb/evtloop.cpp +++ b/src/dfb/evtloop.cpp @@ -52,6 +52,12 @@ void wxEventLoop::InitBuffer() ms_buffer = wxIDirectFB::Get()->CreateEventBuffer(); } +/* static */ +void wxEventLoop::CleanUp() +{ + ms_buffer.Reset(); +} + /* static */ wxIDirectFBEventBufferPtr wxEventLoop::GetDirectFBEventBuffer() { @@ -125,8 +131,6 @@ void wxEventLoop::OnNextIteration() #endif } -#warning "FIXME: cleanup wxEventLoop::ms_buffer before exiting" - //----------------------------------------------------------------------------- // DirectFB -> wxWidgets events translation