Skip to content

Commit

Permalink
Mac OS X 10.5 needs an autoreleasepool here to avoid memory leaks. Ne…
Browse files Browse the repository at this point in the history
…wer versions of Mac OS X do not, but it doesn't hurt to have one anyway.
  • Loading branch information
mdehoon committed Dec 11, 2012
1 parent 2ccc3ba commit 3c444b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/_macosx.m
Expand Up @@ -5693,12 +5693,14 @@ - (int)index
if(nwin > 0)
{
[NSApp activateIgnoringOtherApps: YES];
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
NSArray *windowsArray = [NSApp windows];
NSEnumerator *enumerator = [windowsArray objectEnumerator];
NSWindow *window;
while ((window = [enumerator nextObject])) {
[window orderFront:nil];
}
[pool release];
[NSApp run];
}
Py_INCREF(Py_None);
Expand Down

0 comments on commit 3c444b8

Please sign in to comment.