Title: [Bug]: macOS backend leaks objects in wake_on_fd_write · Issue #31755 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: macOS backend leaks objects in wake_on_fd_write · Issue #31755 · matplotlib/matplotlib
X Title: [Bug]: macOS backend leaks objects in wake_on_fd_write · Issue #31755 · matplotlib/matplotlib
Description: Bug summary Assuming that #31751 is fixed, the macOS backend will still leak an NSFileHandle and opaque NSObject created in wake_on_fd_write. Code for reproduction import matplotlib.pyplot as plt plt.subplots() plt.show() Actual outcome ...
Open Graph Description: Bug summary Assuming that #31751 is fixed, the macOS backend will still leak an NSFileHandle and opaque NSObject created in wake_on_fd_write. Code for reproduction import matplotlib.pyplot as plt p...
X Description: Bug summary Assuming that #31751 is fixed, the macOS backend will still leak an NSFileHandle and opaque NSObject created in wake_on_fd_write. Code for reproduction import matplotlib.pyplot as plt p...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/31755
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: macOS backend leaks objects in wake_on_fd_write","articleBody":"### Bug summary\n\nAssuming that #31751 is fixed, the macOS backend will still leak an NSFileHandle and opaque NSObject created in `wake_on_fd_write`.\n\n### Code for reproduction\n\n```Python\nimport matplotlib.pyplot as plt\nplt.subplots()\nplt.show()\n```\n\n### Actual outcome\n\nA call to `wake_on_fd_write()` creates an NSFileHandle and an _NSObserver, but these are never freed after the observation block executes.\n\n### Expected outcome\n\nAfter the NSFileHandleDataAvailableNotification executes the specified block, both objects should be freed.\n\n### Additional information\n\n_No response_\n\n### Operating system\n\nmacOS 14.7\n\n### Matplotlib Version\n\n0.2.0.dev54528+unknown.gf4cf12592.d20260526\n\n### Matplotlib Backend\n\n_No response_\n\n### Python version\n\n_No response_\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\nNone","author":{"url":"https://github.com/iccir","@type":"Person","name":"iccir"},"datePublished":"2026-05-27T19:29:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/31755/matplotlib/issues/31755"}
| 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:7d4037b4-1474-9ee1-4ff6-f8b704cac0f6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ED6A:2DBF59:33A21:4417C:6A52E5E2 |
| html-safe-nonce | dd283cdbd954c9cecb9da9e08a6e63df3cd515d76273fa912381b51fcabb3805 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDZBOjJEQkY1OTozM0EyMTo0NDE3Qzo2QTUyRTVFMiIsInZpc2l0b3JfaWQiOiI4ODA3Mjg0OTQ0MjYxMDE1MDEwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4fedc45470fb87d3f1a1adece405008655c5b4ea29829293de6a5ad67a78eb05 |
| hovercard-subject-tag | issue:4535154232 |
| 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/31755/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b06272a5ade132484fba5985183241a1ee19eec1b6977a05654cc83d9d274687/matplotlib/matplotlib/issues/31755 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b06272a5ade132484fba5985183241a1ee19eec1b6977a05654cc83d9d274687/matplotlib/matplotlib/issues/31755 |
| og:image:alt | Bug summary Assuming that #31751 is fixed, the macOS backend will still leak an NSFileHandle and opaque NSObject created in wake_on_fd_write. Code for reproduction import matplotlib.pyplot as plt p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | iccir |
| 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