X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..1602d4d0fb10d4aebe0e3d63fbab0bb8d09f34ff:/src/gtk1/dcmemory.cpp?ds=sidebyside diff --git a/src/gtk1/dcmemory.cpp b/src/gtk1/dcmemory.cpp index 0ec10532b7..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 ) @@ -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();