]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/dcmemory.cpp
X error handler should be extern C (SunCC warning fix)
[wxWidgets.git] / src / gtk / dcmemory.cpp
index 0ec10532b7d8ce554a856cda72862eee8115ed91..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 )
@@ -71,6 +74,10 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
             m_window = m_selected.GetBitmap();
         }
 
+#ifdef __WXGTK20__
+        m_selected.PurgeOtherRepresentations(wxBitmap::Pixmap);
+#endif
+
         m_isMemDC = TRUE;
 
         SetUpDC();