Skip to content

Commit

Permalink
Merge pull request #1587 from mdehoon/fix-show-memoryleak
Browse files Browse the repository at this point in the history
Mac OS X 10.5 needs an autoreleasepool here to avoid memory leaks. Newer...
  • Loading branch information
WeatherGod committed Dec 19, 2012
2 parents 32149e4 + 3c444b8 commit 9c60c58
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 9c60c58

Please sign in to comment.