]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/dcmemory.cpp
added pragmas to disable icc warning when va_arg is used with a pointer type
[wxWidgets.git] / src / gtk1 / dcmemory.cpp
index 7a923753f7b8e4a1b15c25bd3c7ca556eb43b10c..c6ecf57072547a953a6caa28045150d8c1066a28 100644 (file)
@@ -4,13 +4,9 @@
 // Author:      Robert Roebling
 // RCS-ID:      $Id$
 // Copyright:   (c) 1998 Robert Roebling
-// Licence:     wxWidgets licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "dcmemory.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -54,6 +50,9 @@ wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
 
 wxMemoryDC::~wxMemoryDC()
 {
+#ifdef __WXGTK20__
+    g_object_unref(m_context);
+#endif
 }
 
 void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
@@ -71,6 +70,10 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
             m_window = m_selected.GetBitmap();
         }
 
+#ifdef __WXGTK20__
+        m_selected.PurgeOtherRepresentations(wxBitmap::Pixmap);
+#endif
+
         m_isMemDC = TRUE;
 
         SetUpDC();