]> git.saurik.com Git - wxWidgets.git/commitdiff
fix memory leak in wxScreenDC, fixes #13249
authorPaul Cornett <paulcor@bullseye.com>
Tue, 31 May 2011 17:16:53 +0000 (17:16 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Tue, 31 May 2011 17:16:53 +0000 (17:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/dcscreen.cpp

index 6a0f1e655d91eb14b91a9b477c6fa063ef660aed..a58d60622e8617577e24911a2bb82f376759337e 100644 (file)
 #include "wx/dcscreen.h"
 #include "wx/gtk/dcscreen.h"
 
-#ifndef WX_PRECOMP
-    #include "wx/window.h"
-#endif
-
-#include <gdk/gdk.h>
-#include <gdk/gdkx.h>
 #include <gtk/gtk.h>
+#include <gdk/gdkx.h>
 
 //-----------------------------------------------------------------------------
 // wxScreenDCImpl
@@ -58,6 +53,8 @@ void wxScreenDCImpl::Init()
 
 wxScreenDCImpl::~wxScreenDCImpl()
 {
+    g_object_unref(m_context);
+
     gdk_gc_set_subwindow( m_penGC, GDK_CLIP_BY_CHILDREN );
     gdk_gc_set_subwindow( m_brushGC, GDK_CLIP_BY_CHILDREN );
     gdk_gc_set_subwindow( m_textGC, GDK_CLIP_BY_CHILDREN );