Skip to content

Conversation

lostmsu
Copy link
Member

@lostmsu lostmsu commented Oct 13, 2022

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 filmor merged commit ce76dae into pythonnet:master Oct 14, 2022
@lostmsu lostmsu deleted the bugs/1972 branch October 14, 2022 18:13
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