Skip to content

Conversation

bonzini
Copy link
Contributor

@bonzini bonzini commented Jun 13, 2020

This is a minimal fix for the subscription leak in #22. I simply went through all operators and ensured that before every onCompleted the subscription is dropped.

I also found a memory leak in the Subscription class. I am fixing it in this pull request since it is mostly visible with operators that complete before their underlying stream.

bonzini added 2 commits June 13, 2020 11:57
In order to avoid a memory leak, drop references to the unsubscribe action
as soon as it is not needed anymore.  This is also a bugfix, because
self.unsubscribed was set to true only after the unsubscribe action
returned.  Therefore the unsubscribe action could be invoked more than
once.

Signed-off-by: Paolo Bonzini <[email protected]>
@4O4
Copy link
Contributor

4O4 commented Oct 17, 2020

Hello, I don't want to send spam but since this is directly related I'll just leave a link to my comment in another issue: #22 (comment)

guillaumearm added a commit to guillaumearm/oc that referenced this pull request Nov 3, 2020
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