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

Minimal fix for issue #22 #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

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.

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.

None yet

2 participants