Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[MNT]: Is the macosx backend (very slowly) leaking strings? #21722

Closed
@anntzer

Description

@anntzer

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp