Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8196c21

Browse files
committed
Merge pull request #5480 from mdehoon/fixForIssue5473
FIX: make sure an autoreleasepool is in place
1 parent c7009ab commit 8196c21

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/_macosx.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6265,8 +6265,10 @@ static void timer_callback(CFRunLoopTimerRef timer, void* info)
62656265
static bool verify_framework(void)
62666266
{
62676267
#ifdef COMPILING_FOR_10_6
6268+
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
62686269
NSRunningApplication* app = [NSRunningApplication currentApplication];
62696270
NSApplicationActivationPolicy activationPolicy = [app activationPolicy];
6271+
[pool release];
62706272
switch (activationPolicy) {
62716273
case NSApplicationActivationPolicyRegular:
62726274
case NSApplicationActivationPolicyAccessory:
@@ -6381,13 +6383,15 @@ void init_macosx(void)
63816383

63826384
PyOS_InputHook = wait_for_stdin;
63836385

6386+
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
63846387
WindowServerConnectionManager* connectionManager = [WindowServerConnectionManager sharedManager];
63856388
NSWorkspace* workspace = [NSWorkspace sharedWorkspace];
63866389
NSNotificationCenter* notificationCenter = [workspace notificationCenter];
63876390
[notificationCenter addObserver: connectionManager
63886391
selector: @selector(launch:)
63896392
name: NSWorkspaceDidLaunchApplicationNotification
63906393
object: nil];
6394+
[pool release];
63916395
#if PY3K
63926396
return module;
63936397
#endif

0 commit comments

Comments
 (0)