Delete target object from event handler collections when it has no more event handlers by lostmsu · Pull Request #1973 · pythonnet/pythonnet
Repository navigation
Delete target object from event handler collections when it has no more event handlers - #1973
Merged
filmor merged 3 commits into pythonnet:master from 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:master from 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
a few debug helper properties
b5c222c
fixed name collision for generated delegate dispatchers
6838ee1
delete target object from event handler collections when it has no mo...
5a28fd4
...re event handlers fixes pythonnet#1972lostmsu force-pushed the bugs/1972 branch from
9ace8dc to
5a28fd4
Compare
October 13, 2022 20:37 filmor merged commit
ce76dae
into
pythonnet : master
Oct 14, 2022
lostmsu
deleted the
bugs/1972
branch
October 14, 2022 18:13
2014jorgealvarez-debug
mentioned this pull request
Nov 26, 2026
.NET object is never collected once a Python event handler has been attached, even after removing it (3.2.1, regression of #1972?)
#2755
Open
Sign up for free
to join this conversation on GitHub .
Already have an account?
Sign in to comment