X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/065e208ec09e3d08d51d9604497f92f53c210f93..45b323521bcc3b79c6aa02acc48269eb7e5a80f0:/src/cocoa/dcmemory.mm?ds=sidebyside diff --git a/src/cocoa/dcmemory.mm b/src/cocoa/dcmemory.mm index 7ce8c835aa..1c79b3ad67 100644 --- a/src/cocoa/dcmemory.mm +++ b/src/cocoa/dcmemory.mm @@ -15,6 +15,8 @@ #include "wx/dcmemory.h" #endif //WX_PRECOMP +#include "wx/cocoa/autorelease.h" + #import #import #import @@ -67,6 +69,7 @@ bool wxMemoryDC::CocoaUnlockFocus() // instead copy the data to an offscreen window, then copy it back void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) { + wxAutoNSAutoreleasePool pool; if(m_selectedBitmap.Ok()) { CocoaTakeFocus();