X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..3d1a1d2df6345ebea69490e03d0befa0def83fd3:/src/gtk1/dcmemory.cpp diff --git a/src/gtk1/dcmemory.cpp b/src/gtk1/dcmemory.cpp index 0ec10532b7..c6ecf57072 100644 --- a/src/gtk1/dcmemory.cpp +++ b/src/gtk1/dcmemory.cpp @@ -7,10 +7,6 @@ // 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();