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

EventLoopScheduler: set _nextItem to null on Tick #421

Merged
merged 1 commit into from May 26, 2018
Merged

EventLoopScheduler: set _nextItem to null on Tick #421

merged 1 commit into from May 26, 2018

Conversation

ghost
Copy link

@ghost ghost commented Aug 29, 2017

This fixes a potential memory leak.

If _queue is empty after the item is removed from it, then _nextItem is never overriden and therefore keeps a reference to item.
Until another action is scheduled with a future due time, the item and all its associated state is kept in memory.
(cherry picked from commit 2679e8e)

see also #325

If _queue is empty after the item is removed from it, then _nextItem is never overriden and therefore keeps a reference to item.
Until another action is scheduled with a future due time, the item and all its associated state is kept in memory.
(cherry picked from commit 2679e8e)
Copy link
Collaborator

@akarnokd akarnokd left a comment

Choose a reason for hiding this comment

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

Looks good to me. With an update branch from the GitHub UI it can be merged.

@clairernovotny clairernovotny merged commit aea0a5b into dotnet:master May 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants