Skip to content

Fix ref cycles in callback handles#225

Merged
1st1 merged 2 commits intomasterfrom
callback
Feb 11, 2019
Merged

Fix ref cycles in callback handles#225
1st1 merged 2 commits intomasterfrom
callback

Conversation

@1st1
Copy link
Copy Markdown
Member

@1st1 1st1 commented Feb 11, 2019

No description provided.

@1st1
Copy link
Copy Markdown
Member Author

1st1 commented Feb 11, 2019

@fantix please take a look

Copy link
Copy Markdown
Member

@fantix fantix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the fix!

1st1 added 2 commits February 11, 2019 17:17
Currently there's a lot of potential to create reference cycles
between callback handles and protocols/transports that use them.
Basically any bound-method has a potential to create such a cycle.
This happens especially often for TimerHandles used to ensure
timeouts.

Fix that by ensuring that the handle clears the ref to its callback
when the 'cancel()' method is called.
@fantix fantix mentioned this pull request Feb 11, 2019
4 tasks
@1st1 1st1 merged commit 34b7320 into master Feb 11, 2019
@1st1 1st1 deleted the callback branch February 11, 2019 23:48
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