Title: [Bug]: macOS backend leaks NSTrackingArea · Issue #31754 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: macOS backend leaks NSTrackingArea · Issue #31754 · matplotlib/matplotlib
X Title: [Bug]: macOS backend leaks NSTrackingArea · Issue #31754 · matplotlib/matplotlib
Description: Bug summary Assuming that #31751 is fixed, the macOS backend will still leak the NSTrackingArea created in FigureCanvas_init. Code for reproduction import matplotlib.pyplot as plt plt.subplots() plt.show() Actual outcome A NSTrackingArea...
Open Graph Description: Bug summary Assuming that #31751 is fixed, the macOS backend will still leak the NSTrackingArea created in FigureCanvas_init. Code for reproduction import matplotlib.pyplot as plt plt.subplots() pl...
X Description: Bug summary Assuming that #31751 is fixed, the macOS backend will still leak the NSTrackingArea created in FigureCanvas_init. Code for reproduction import matplotlib.pyplot as plt plt.subplots() pl...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/31754
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: macOS backend leaks NSTrackingArea","articleBody":"### Bug summary\n\nAssuming that #31751 is fixed, the macOS backend will still leak the NSTrackingArea created in `FigureCanvas_init`.\n\n### Code for reproduction\n\n```Python\nimport matplotlib.pyplot as plt\nplt.subplots()\nplt.show()\n```\n\n### Actual outcome\n\nA NSTrackingArea object has a retainCount of +2. After the view hierarchy is dealloc'd, the retainCount is still +1.\n\n### Expected outcome\n\nThe NSTrackingArea is freed when the view hierarchy is 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:25:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/31754/matplotlib/issues/31754"}
| 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:f435b7ba-8ac4-0bad-67ef-33bb54af0505 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EAF2:318371:49A95:64474:6A5255C8 |
| html-safe-nonce | 2eba4bdbe1df4a45cb463cbb50dd381d03731925340ccd0c407bbf68073d4e83 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQUYyOjMxODM3MTo0OUE5NTo2NDQ3NDo2QTUyNTVDOCIsInZpc2l0b3JfaWQiOiI4NDQ4MTYwNzU1NTg5NzMxNzg0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 85cd199043e7d7f74e975395c12613f64d106aa825bc5bf6d745cd9cdd47d331 |
| hovercard-subject-tag | issue:4535129747 |
| 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/31754/issue_layout |
| twitter:image | https://opengraph.githubassets.com/933a1dd2f1415616f50b1b27837fe442519bf58c98cc2c47ac40ff95457684b4/matplotlib/matplotlib/issues/31754 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/933a1dd2f1415616f50b1b27837fe442519bf58c98cc2c47ac40ff95457684b4/matplotlib/matplotlib/issues/31754 |
| og:image:alt | Bug summary Assuming that #31751 is fixed, the macOS backend will still leak the NSTrackingArea created in FigureCanvas_init. Code for reproduction import matplotlib.pyplot as plt plt.subplots() pl... |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width