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

[BUGFIX release-1-13] Ensure concat streams unsubscribe properly. #12256

Merged
merged 1 commit into from
Sep 1, 2015

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Sep 1, 2015

The stream returned by concat should subscribe to any input streams so that the "concat stream" is marked as dirty if any of the input streams are dirtied. This is/was working properly.

Unfortunately, when subscribeing directly as done in 1.13.0, the subscriptions are never cleared if the "concat stream" is deactivated. This means, that listeners build up over time and leak the "concat streams" and the KeyStream's / ProxyStream's that are in use.

Using stream.addDependency instead of manually subscribeing allows the returned "concat stream" to properly remove subscribers when it is deactivated.

Authored by @raytiley / @rwjblue / @mmun.

Fixes #11802.

@mmun
Copy link
Member

mmun commented Sep 1, 2015

👍

@stefanpenner
Copy link
Member

oh, awesome!

@rwjblue rwjblue force-pushed the cleanup-concat-subscription branch from 6215c98 to 4211074 Compare September 1, 2015 04:04
The stream returned by `concat` should subscribe to any input
streams so that the "concat stream" is marked as dirty if any of
the input streams are dirtied. This is/was working properly.

Unfortunately, when `subscribe`ing directly as done in 1.13.0, the
subscriptions are never cleared if the "concat stream" is deactivated.
This means, that listeners build up over time and leak the "concat
streams" and the `KeyStream`'s / `ProxyStream`'s that are in use.

Using `stream.addDependency` instead of manually `subscribe`ing allows
the returned "concat stream" to properly remove subscribers when it is
deactivated.
@rwjblue rwjblue force-pushed the cleanup-concat-subscription branch from 4211074 to dc4fbd9 Compare September 1, 2015 04:10
rwjblue added a commit that referenced this pull request Sep 1, 2015
[BUGFIX release-1-13] Ensure concat streams unsubscribe properly.
@rwjblue rwjblue merged commit 0f6e7d8 into emberjs:master Sep 1, 2015
@rwjblue rwjblue deleted the cleanup-concat-subscription branch September 1, 2015 04:16
@rwjblue
Copy link
Member Author

rwjblue commented Sep 1, 2015

Cherry picked into release-1-13 branch, when Travis is done you should be able to bower install --save ember#release-1-13 to get this fix.

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.

3 participants