improving autorelease memory handling
life sample was using up memory when running in a tight loop, because the normal event autorelease pool was never reached
This commit is contained in:
@@ -93,6 +93,8 @@ public:
|
|||||||
|
|
||||||
virtual void SetLabel(const wxString& title, wxFontEncoding encoding) wxOVERRIDE
|
virtual void SetLabel(const wxString& title, wxFontEncoding encoding) wxOVERRIDE
|
||||||
{
|
{
|
||||||
|
wxMacAutoreleasePool autoreleasepool;
|
||||||
|
|
||||||
wxCFStringRef text( title , encoding );
|
wxCFStringRef text( title , encoding );
|
||||||
|
|
||||||
NSMutableAttributedString *
|
NSMutableAttributedString *
|
||||||
|
@@ -3070,6 +3070,8 @@ void SetSubviewsNeedDisplay( NSView *view )
|
|||||||
|
|
||||||
void wxWidgetCocoaImpl::SetNeedsDisplay( const wxRect* where )
|
void wxWidgetCocoaImpl::SetNeedsDisplay( const wxRect* where )
|
||||||
{
|
{
|
||||||
|
wxMacAutoreleasePool autoreleasepool;
|
||||||
|
|
||||||
if ( where )
|
if ( where )
|
||||||
[m_osxView setNeedsDisplayInRect:wxToNSRect(m_osxView, *where )];
|
[m_osxView setNeedsDisplayInRect:wxToNSRect(m_osxView, *where )];
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user