Skip to content

Fix ref cycles in callback handles#225

Merged
1st1 merged 2 commits into
masterfrom
callback
Feb 11, 2019
Merged

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

Conversation

@1st1

@1st1 1st1 commented Feb 11, 2019

Copy link
Copy Markdown
Member

No description provided.

@1st1

1st1 commented Feb 11, 2019

Copy link
Copy Markdown
Member Author

@fantix please take a look

@fantix fantix left a comment

Copy link
Copy Markdown
Member

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!

Yury Selivanov 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