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:
Stefan Csomor
2019-11-20 16:23:52 +01:00
parent db2e571c1b
commit 59d1cb8756
2 changed files with 4 additions and 0 deletions

View File

@@ -93,6 +93,8 @@ public:
virtual void SetLabel(const wxString& title, wxFontEncoding encoding) wxOVERRIDE
{
wxMacAutoreleasePool autoreleasepool;
wxCFStringRef text( title , encoding );
NSMutableAttributedString *

View File

@@ -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