Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix memory leak in finalizer #836

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Martin-Molinero
Copy link
Contributor

What does this implement/fix? Explain your changes.

  • finalizer was leaking _pendingArgs (global memory) when the call
    to Py_AddPendingCall was unsuccessful.
  • Changing lock for Monitor.TryEnter at AddPendingCollect() so
    threads don't block each other.

Does this close any currently open issues?

...

Any other comments?

...

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change
  • If an enhancement PR, please create docs and at best an example
  • Add yourself to AUTHORS
  • Updated the CHANGELOG

- `finalizer` was leaking `_pendingArgs` (global memory) when the call
to `Py_AddPendingCall` was unsuccessful.
- Changing `lock` for `Monitor.TryEnter` at `AddPendingCollect()` so
threads don't block each other.
@filmor filmor merged commit 4919915 into pythonnet:master Apr 2, 2019
@filmor
Copy link
Member

filmor commented Apr 2, 2019

Thank you very much for this, I was already starting to rebase the PR from the fork :)

@Martin-Molinero
Copy link
Contributor Author

Sure! thank you, happy to help :)

@Martin-Molinero Martin-Molinero deleted the fix-for-memory-leak-finalizer branch August 27, 2019 20:40
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.

2 participants