Title: [MNT]: Re-enable Automatic Reference Counting (ARC) for macOS backend. · Issue #31797 · matplotlib/matplotlib · GitHub
Open Graph Title: [MNT]: Re-enable Automatic Reference Counting (ARC) for macOS backend. · Issue #31797 · matplotlib/matplotlib
X Title: [MNT]: Re-enable Automatic Reference Counting (ARC) for macOS backend. · Issue #31797 · matplotlib/matplotlib
Description: Summary @greglucas mentioned that he is interested in moving the macOS backend to ARC. This was previously attempted in #23060, caused a crash in #23653, and reverted in #23654. After my memory-management PR lands, enabling ARC should be...
Open Graph Description: Summary @greglucas mentioned that he is interested in moving the macOS backend to ARC. This was previously attempted in #23060, caused a crash in #23653, and reverted in #23654. After my memory-man...
X Description: Summary @greglucas mentioned that he is interested in moving the macOS backend to ARC. This was previously attempted in #23060, caused a crash in #23653, and reverted in #23654. After my memory-man...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/31797
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[MNT]: Re-enable Automatic Reference Counting (ARC) for macOS backend.","articleBody":"### Summary\n\n@greglucas mentioned that he is interested in moving the macOS backend to ARC. This was previously attempted in #23060, caused a crash in #23653, and reverted in #23654.\n\nAfter my memory-management PR lands, enabling ARC should be relatively straightforward.\n\nThe one issue is that we store Obj-C objects into C structs (allocated by `tp_alloc`). Support for ARC objects in C structs wasn't added until macOS 10.14 / Xcode 10. We support compiling on macOS 10.12.\n\nAdditionally, even if we changed our minimum macOS to 10.14, we would need to ensure that `tp_alloc` guarantees zero-filled memory to be compatible with the Xcode 10 feature.\n\nIn the meantime, we will have to use an `__unsafe_unretained` attribute on the objects in our C structs, and manually retain/release them.\n\n### Proposed fix\n\n_No response_","author":{"url":"https://github.com/iccir","@type":"Person","name":"iccir"},"datePublished":"2026-05-31T17:58:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/31797/matplotlib/issues/31797"}
| 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:8ee58ca9-8c12-bd9a-d993-d77414120e02 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A18C:2818E8:11BBE06:17D4C4A:6A52A347 |
| html-safe-nonce | d20061c8d2587ca38393fab121a788491e0667e06f996130addecf168e0754bc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMThDOjI4MThFODoxMUJCRTA2OjE3RDRDNEE6NkE1MkEzNDciLCJ2aXNpdG9yX2lkIjoiMzIzMzcxNTY3MjQ3MjI2NTU0MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4d111968c870abea38725020a4c923cb8f0b92d1e5fa81677657e1077a71f7cb |
| hovercard-subject-tag | issue:4558464332 |
| 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/31797/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1e52dff771472510f6de7ef8c357716bf840ccfeecbb895a232d1e9f12fec7dc/matplotlib/matplotlib/issues/31797 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1e52dff771472510f6de7ef8c357716bf840ccfeecbb895a232d1e9f12fec7dc/matplotlib/matplotlib/issues/31797 |
| og:image:alt | Summary @greglucas mentioned that he is interested in moving the macOS backend to ARC. This was previously attempted in #23060, caused a crash in #23653, and reverted in #23654. After my memory-man... |
| 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