From 42c60e749f84bae32b372d1aedfc9fef74036aee Mon Sep 17 00:00:00 2001 From: Mart Raudsepp Date: Fri, 2 Sep 2005 05:14:21 +0000 Subject: [PATCH] [wxGTK2] Plug memory leak in wxMemoryDC (approx. 525 bytes per object) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/dcmemory.cpp | 3 +++ src/gtk1/dcmemory.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/gtk/dcmemory.cpp b/src/gtk/dcmemory.cpp index a3ac365287..cab5297746 100644 --- a/src/gtk/dcmemory.cpp +++ b/src/gtk/dcmemory.cpp @@ -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 ) diff --git a/src/gtk1/dcmemory.cpp b/src/gtk1/dcmemory.cpp index a3ac365287..cab5297746 100644 --- a/src/gtk1/dcmemory.cpp +++ b/src/gtk1/dcmemory.cpp @@ -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 )