Title: Clear weakref list when reflected object is destroyed by lostmsu · Pull Request #1758 · pythonnet/pythonnet · GitHub
Open Graph Title: Clear weakref list when reflected object is destroyed by lostmsu · Pull Request #1758 · pythonnet/pythonnet
X Title: Clear weakref list when reflected object is destroyed by lostmsu · Pull Request #1758 · pythonnet/pythonnet
Description: What does this implement/fix? Explain your changes. According to official documentation for defining extension types, if they are to support weak references, they must clear weak reference list associated with the instance in tp_clear. This was missed when #1267 was superseded. P.S. without the fix corresponding test would crash with segfault due to an attempt to dereference an object that no longer exists via a weak reference to it. Does this close any currently open issues? N/A Checklist Check all those that are applicable and complete. Make sure to include one or more tests for your change
Open Graph Description: What does this implement/fix? Explain your changes. According to official documentation for defining extension types, if they are to support weak references, they must clear weak reference list ass...
X Description: What does this implement/fix? Explain your changes. According to official documentation for defining extension types, if they are to support weak references, they must clear weak reference list ass...
Opengraph URL: https://github.com/pythonnet/pythonnet/pull/1758
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:721b18ec-6aa1-deee-12d7-5f2ae1973095 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E16C:85314:3F1B83:589155:6970A7C1 |
| html-safe-nonce | d4030d3636ef87cf425cf97e1a00377c4acce42ea74b52c253e8ab8cef871721 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTZDOjg1MzE0OjNGMUI4Mzo1ODkxNTU6Njk3MEE3QzEiLCJ2aXNpdG9yX2lkIjoiNzQ0MzE0NDUzMjkzNDMwNTczMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2bffb556cd8bd099f362452dee30be90a1359735ab139d6830bd0155e7071b94 |
| hovercard-subject-tag | pull_request:904287515 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/pythonnet/pythonnet/pull/1758/files |
| twitter:image | https://avatars.githubusercontent.com/u/239520?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/239520?s=400&v=4 |
| og:image:alt | What does this implement/fix? Explain your changes. According to official documentation for defining extension types, if they are to support weak references, they must clear weak reference list ass... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5246860f280a060af866c1c633f74a6720ad2dd5d576534e4c5e462496b693ae |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git |
| octolytics-dimension-user_id | 6050430 |
| octolytics-dimension-user_login | pythonnet |
| octolytics-dimension-repository_id | 14748123 |
| octolytics-dimension-repository_nwo | pythonnet/pythonnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14748123 |
| octolytics-dimension-repository_network_root_nwo | pythonnet/pythonnet |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7d29ab0ba8deb7bbecf06b664759d4e847623783 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width