Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Milestone
Description
Summary
macosx.m contains the following snippets:
static PyObject*FigureManager_set_window_title(FigureManager* self, PyObject *args, PyObject *kwds)// elided NSString* ns_title = [[[NSString alloc] initWithCString: title encoding: NSUTF8StringEncoding] autorelease]; [windowsetTitle: ns_title];// elided
and
static PyObject*choose_save_file(PyObject* unused, PyObject* args)// elided [panel setTitle: [NSString stringWithCString: title encoding: NSASCIIStringEncoding]];NSString* ns_default_filename = [[NSStringalloc]initWithCString: default_filenameencoding: NSUTF8StringEncoding]; [panelsetNameFieldStringValue: ns_default_filename];// elided
I'm don't know anything about autorelease semantics, but it seems a bit worrying that set_window_title makes some GC-related action on ns_title (autorelease
) whereas choose_save_file doesn't, just usingtitle
andns_default_filename
directly. Or perhaps nothing matters and theautorelease
in set_window_title is redundant?
Proposed fix
No response