Skip to content

Commit e8d2098

Browse files
committed
Make an autorelease pool, otherwise we're leaking memory.
svn path=/trunk/matplotlib/; revision=8936
1 parent 7330b6a commit e8d2098

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/_macosx.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4705,8 +4705,10 @@ -(void)save_figure:(id)sender
47054705
NSText* messagebox = self->messagebox;
47064706

47074707
if (messagebox)
4708-
{ NSString* text = [NSString stringWithUTF8String: message];
4708+
{ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
4709+
NSString* text = [NSString stringWithUTF8String: message];
47094710
[messagebox setString: text];
4711+
[pool release];
47104712
}
47114713

47124714
Py_INCREF(Py_None);

0 commit comments

Comments
 (0)