X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5575dacc5004176c5d617788bdffc5fc10b27436..48d43515c24e7f3032a7119179da4eddaf4c1ed4:/src/osx/carbon/dcscreen.cpp diff --git a/src/osx/carbon/dcscreen.cpp b/src/osx/carbon/dcscreen.cpp index 3b9e51541a..cbd90382e9 100644 --- a/src/osx/carbon/dcscreen.cpp +++ b/src/osx/carbon/dcscreen.cpp @@ -56,8 +56,7 @@ wxScreenDCImpl::wxScreenDCImpl( wxDC *owner ) : wxScreenDCImpl::~wxScreenDCImpl() { - delete m_graphicContext; - m_graphicContext = NULL; + wxDELETE(m_graphicContext); #if wxOSX_USE_COCOA_OR_IPHONE #else DisposeWindow((WindowRef) m_overlayWindow ); @@ -95,7 +94,7 @@ wxBitmap wxScreenDCImpl::DoGetAsBitmap(const wxRect *subrect) const wxASSERT_MSG(image, wxT("wxScreenDC::GetAsBitmap - unable to get screenshot.")); CGContextDrawImage(context, srcRect, image); - + CGImageRelease(image); CGContextRestoreGState(context);