Skip to content

Conversation

@danielcweber
Copy link
Collaborator

Some registration of continuations on tasks are possibly never unregistered, which may lead to memory leaks if the tasks are long lived. This PR attemps to fix this.

…avoid leaking the continuation on long-lived tasks.
…void a leaking continuation if the task lives longer than the Sink.
…is is a bit more involved. The continuation must not be registered before a subscription happens because it might leak on long lived tasks. So instead of registering a continuation on a task once and forwarding the results to an AsyncSubject, we construct an Observable that registers the continuation for each subscription. Memory performance might of course go down if a lot of subscriptions happen on a task, but it won't leak.
@danielcweber danielcweber merged commit 0bf8cff into dotnet:master Jul 5, 2018
@danielcweber danielcweber deleted the AvoidLeakingTaskContinuations branch July 5, 2018 19:31
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