]> git.saurik.com Git - wxWidgets.git/commitdiff
clean DFB event buffer on shutdown
authorVáclav Slavík <vslavik@fastmail.fm>
Sat, 30 Sep 2006 19:22:40 +0000 (19:22 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sat, 30 Sep 2006 19:22:40 +0000 (19:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/dfb/evtloop.h
src/dfb/app.cpp
src/dfb/evtloop.cpp

index 11366e70a3c0adf658b470aabc61c345977f90ce..cf77e26c1322cb2f4eb212c79032b1067195066d 100644 (file)
@@ -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)
 };
 
index ea4764ccbc8ecd43ba3b51be35dd15783ffda77b..fc5357d91f8567f17623b73d06fbdd4de4ea8883 100644 (file)
@@ -57,6 +57,7 @@ void wxApp::CleanUp()
 {
     wxAppBase::CleanUp();
 
+    wxEventLoop::CleanUp();
     wxIDirectFB::CleanUp();
 }
 
index 78bca48df8a374dd731db0c736f013e9f647b9a6..52b940c9f40078835bd909e8d5d488e899a16db0 100644 (file)
@@ -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