Title: [MNT]: Is the macosx backend (very slowly) leaking strings? · Issue #21722 · matplotlib/matplotlib · GitHub
Open Graph Title: [MNT]: Is the macosx backend (very slowly) leaking strings? · Issue #21722 · matplotlib/matplotlib
X Title: [MNT]: Is the macosx backend (very slowly) leaking strings? · Issue #21722 · matplotlib/matplotlib
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: NSU...
Open Graph 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 all...
X 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 all...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/21722
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[MNT]: Is the macosx backend (very slowly) leaking strings?","articleBody":"### Summary\n\nmacosx.m contains the following snippets:\r\n```objc\r\nstatic PyObject*\r\nFigureManager_set_window_title(FigureManager* self,\r\n PyObject *args, PyObject *kwds)\r\n// elided\r\n NSString* ns_title = [[[NSString alloc]\r\n initWithCString: title\r\n encoding: NSUTF8StringEncoding] autorelease];\r\n [window setTitle: ns_title];\r\n// elided\r\n```\r\nand\r\n```objc\r\nstatic PyObject*\r\nchoose_save_file(PyObject* unused, PyObject* args)\r\n// elided\r\n [panel setTitle: [NSString stringWithCString: title\r\n encoding: NSASCIIStringEncoding]];\r\n NSString* ns_default_filename =\r\n [[NSString alloc]\r\n initWithCString: default_filename\r\n encoding: NSUTF8StringEncoding];\r\n [panel setNameFieldStringValue: ns_default_filename];\r\n// elided\r\n```\r\nI'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 using `title` and `ns_default_filename` directly. Or perhaps nothing matters and the `autorelease` in set_window_title is redundant?\n\n### Proposed fix\n\n_No response_","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2021-11-23T01:10:50.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/21722/matplotlib/issues/21722"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0b506ca7-d482-7390-e95f-44382d47c356 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D21A:29B71F:91FFC0:C3AB43:6A529101 |
| html-safe-nonce | b6c0e089cabb5a23dab7130d9c81af30924a9b5188875aacec73833340ecd794 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjFBOjI5QjcxRjo5MUZGQzA6QzNBQjQzOjZBNTI5MTAxIiwidmlzaXRvcl9pZCI6IjE1NTk4NjM2MTQ2Njc2NTc0NzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 51eadc7aa8eedfc2b8cba1f268176155129be25669db07084035c4d66ec01d2d |
| hovercard-subject-tag | issue:1060745615 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/21722/issue_layout |
| twitter:image | https://opengraph.githubassets.com/08b7149cbbb3ee2649bba6b2804fdf1f30c21b4e0b9d5386c1a10c0a72488ccb/matplotlib/matplotlib/issues/21722 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/08b7149cbbb3ee2649bba6b2804fdf1f30c21b4e0b9d5386c1a10c0a72488ccb/matplotlib/matplotlib/issues/21722 |
| og:image:alt | Summary macosx.m contains the following snippets: static PyObject* FigureManager_set_window_title(FigureManager* self, PyObject *args, PyObject *kwds) // elided NSString* ns_title = [[[NSString all... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anntzer |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width