Skip to content
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

Fix memory leak related to call_later() and call_at() #240

Merged
merged 1 commit into from
Mar 20, 2019
Merged

Conversation

1st1
Copy link
Member

@1st1 1st1 commented Mar 20, 2019

The crux of the problem is that TimerHandle did not clean up a strong
reference from the event loop to self. This typically isn't a problem
unless there's another strong reference to the loop from the callback or
from its arguments (such as a Future).

A few new unit tests should ensure this kind of bugs won't happen again.

Fixes: #239.

The crux of the problem is that TimerHandle did not clean up a strong
reference from the event loop to `self`.  This typically isn't a problem
unless there's another strong reference to the loop from the callback or
from its arguments (such as a Future).

A few new unit tests should ensure this kind of bugs won't happen again.

Fixes: #239.
@1st1
Copy link
Member Author

1st1 commented Mar 20, 2019

@jlaine Yeah, thanks for the suggestion. It got me thinking that we shouldn't waste one extra pointer for debug information that's used 1% of the time at best, so I combined callback name & source traceback into one tuple.

@1st1 1st1 merged commit 2b6620b into master Mar 20, 2019
@1st1 1st1 deleted the fixleak branch March 20, 2019 14:59
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.

1 participant