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
|
||||
{
|
||||
wxMacAutoreleasePool autoreleasepool;
|
||||
|
||||
wxCFStringRef text( title , encoding );
|
||||
|
||||
NSMutableAttributedString *
|
||||
|
@@ -3070,6 +3070,8 @@ void SetSubviewsNeedDisplay( NSView *view )
|
||||
|
||||
void wxWidgetCocoaImpl::SetNeedsDisplay( const wxRect* where )
|
||||
{
|
||||
wxMacAutoreleasePool autoreleasepool;
|
||||
|
||||
if ( where )
|
||||
[m_osxView setNeedsDisplayInRect:wxToNSRect(m_osxView, *where )];
|
||||
else
|
||||
|
Reference in New Issue
Block a user