]> git.saurik.com Git - wxWidgets.git/commitdiff
[wxGTK2] Plug memory leak in wxMemoryDC (approx. 525 bytes per object)
authorMart Raudsepp <leio@gentoo.org>
Fri, 2 Sep 2005 05:14:21 +0000 (05:14 +0000)
committerMart Raudsepp <leio@gentoo.org>
Fri, 2 Sep 2005 05:14:21 +0000 (05:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/dcmemory.cpp
src/gtk1/dcmemory.cpp

index a3ac365287797b80972362e05d9bf963a554e360..cab52977462d7be023bd0fa682e66b73a2271cbf 100644 (file)
@@ -54,6 +54,9 @@ wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
 
 wxMemoryDC::~wxMemoryDC()
 {
+#ifdef __WXGTK20__
+    g_object_unref(m_context);
+#endif
 }
 
 void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
index a3ac365287797b80972362e05d9bf963a554e360..cab52977462d7be023bd0fa682e66b73a2271cbf 100644 (file)
@@ -54,6 +54,9 @@ wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
 
 wxMemoryDC::~wxMemoryDC()
 {
+#ifdef __WXGTK20__
+    g_object_unref(m_context);
+#endif
 }
 
 void wxMemoryDC::SelectObject( const wxBitmap& bitmap )