8000 Minor fixes in _macosx.m by jkseppan · Pull Request #2994 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Minor fixes in _macosx.m #2994

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 22, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
10000
Diff view
Diff view
Prev Previous commit
Release some unreleased objects in the macosx backend
  • Loading branch information
jkseppan committed Apr 19, 2014
commit 0d775a4951c4ef1f93086a8c6dfa6c549181d80f
9 changes: 6 additions & 3 deletions src/_macosx.m
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ static int wait_for_stdin(void)
if (interrupted) raise(SIGINT);
}
CFReadStreamClose(stream);
CFRelease(stream);
return 1;
}

Expand Down Expand Up @@ -2103,6 +2104,7 @@ static int _find_maximum(CGFloat values[3])
function,
true,
true);
CGColorSpaceRelease(colorspace);
CGFunctionRelease(function);
if (shading)
{
Expand Down Expand Up @@ -2236,6 +2238,7 @@ static CGRect _find_enclosing_rect(CGPoint points[3])
CGImageRef mask = CGBitmapContextCreateImage(bitmap);
CGContextClipToMask(cr, rect, mask);
CGImageRelease(mask);
CGContextRelease(bitmap);
free(data);
return 0;
}
Expand Down Expand Up @@ -3990,9 +3993,9 @@ static void _data_provider_release(void* info, const void* data, size_t size)
if(window)
{
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
NSString* ns_title = [[NSString alloc]
initWithCString: title
encoding: NSUTF8StringEncoding];
NSString* ns_title = [[[NSString alloc]
initWithCString: title
encoding: NSUTF8StringEncoding] autorelease];
[window setTitle: ns_title];
[pool release];
}
Expand Down
0