Skip to content

Commit 3c444b8

Browse files
committed
Mac OS X 10.5 needs an autoreleasepool here to avoid memory leaks. Newer versions of Mac OS X do not, but it doesn't hurt to have one anyway.
1 parent 2ccc3ba commit 3c444b8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/_macosx.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5693,12 +5693,14 @@ - (int)index
56935693
if(nwin > 0)
56945694
{
56955695
[NSApp activateIgnoringOtherApps: YES];
5696+
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
56965697
NSArray *windowsArray = [NSApp windows];
56975698
NSEnumerator *enumerator = [windowsArray objectEnumerator];
56985699
NSWindow *window;
56995700
while ((window = [enumerator nextObject])) {
57005701
[window orderFront:nil];
57015702
}
5703+
[pool release];
57025704
[NSApp run];
57035705
}
57045706
Py_INCREF(Py_None);

0 commit comments

Comments
 (0)