Yield changes:
1. Rework the loop using wxAutoNSAutoreleasePool such that each iteration (get/send event) is done within the context of an NSAutoreleasePool. 2. Use nil instead of [NSDate distantPast] (means the same thing) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -306,12 +306,16 @@ bool wxApp::Yield(bool onlyIfNeeded)
|
||||
s_inYield = true;
|
||||
|
||||
// Run the event loop until it is out of events
|
||||
while(NSEvent *event = [GetNSApplication()
|
||||
nextEventMatchingMask:NSAnyEventMask
|
||||
untilDate:[NSDate distantPast]
|
||||
inMode:NSDefaultRunLoopMode
|
||||
dequeue: YES])
|
||||
while(1)
|
||||
{
|
||||
wxAutoNSAutoreleasePool pool;
|
||||
NSEvent *event = [GetNSApplication()
|
||||
nextEventMatchingMask:NSAnyEventMask
|
||||
untilDate:nil /* ==[NSDate distantPast] */
|
||||
inMode:NSDefaultRunLoopMode
|
||||
dequeue: YES];
|
||||
if(!event)
|
||||
break;
|
||||
[GetNSApplication() sendEvent: event];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user