FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Delete target object from event handler collections when it has no more event handlers by lostmsu · Pull Request #1973 · pythonnet/pythonnet · GitHub

Delete target object from event handler collections when it has no more event handlers - #1973

Merged
filmor merged 3 commits into
pythonnet:masterfrom
losttech:bugs/1972
Oct 14, 2022
Merged

Delete target object from event handler collections when it has no more event handlers#1973
filmor merged 3 commits into
pythonnet:masterfrom
losttech:bugs/1972

Conversation

lostmsu commented Oct 13, 2022

Copy link
Copy Markdown
Member

What does this implement/fix? Explain your changes.

The objects were leaking because they were kept as keys in a dictionary, that stored event handlers corresponding to object.

This change ensures that when the last handler is removed from an object, the object is removed from that dictionary.

Does this close any currently open issues?

fixes #1972

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change
  • Updated the CHANGELOG

filmor merged commit ce76dae into pythonnet:master Oct 14, 2022
lostmsu deleted the bugs/1972 branch October 14, 2022 18:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Memory leak when attaching event handlers from Python

2 participants


Back | FazBrowse Home | New Git URL