8000 make sure an autoreleasepool is in place · matplotlib/matplotlib@1443515 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1443515

Browse files
committed
make sure an autoreleasepool is in place
1 parent 5ac32f3 commit 1443515

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
@@ -6264,8 +6264,10 @@ static void timer_callback(CFRunLoopTimerRef timer, void* info)
62646264
static bool verify_framework(void)
62656265
{
62666266
#ifdef COMPILING_FOR_10_6
6267+
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
62676268
NSRunningApplication* app = [NSRunningApplication currentApplication];
62686269
NSApplicationActivationPolicy activationPolicy = [app activationPolicy];
6270+
[pool release];
62696271
switch (activationPolicy) {
62706272
case NSApplicationActivationPolicyRegular:
62716273
case NSApplicationActivationPolicyAccessory:
@@ -6380,13 +6382,15 @@ void init_macosx(void)
63806382

63816383
PyOS_InputHook = wait_for_stdin;
63826384

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

0 commit comments

Comments
 (0)
0