Fix unsubscribe not called when: disposing an observe on a child node or unmounting a synced useObservable#622
Open
msantang78 wants to merge 2 commits intoLegendApp:mainfrom
Open
Conversation
Contributor
Author
|
I also found that:
Besides the missing functionality this should be causing memory leaks. |
c33e5e8 to
e26d500
Compare
ac6dc7a to
dd3e67a
Compare
Contributor
Author
|
@jmeistrich sorry to tag you, but this one seems important, It leads to memory leaks and not been able to use subscriptions. Can you please check it out when you have a moment 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a proposed fix for #621 and #624
It solves:
1. Unsubscribe is not called when disposing an observe on a child node #621
Changes
listeners-clearedis triggered for the parents node when there is no more listenerslistener-addedfor parents (it was not triggered again after the first un-subscription)At the moment,
listener-addedis only triggered for synced nodes due to the test “should only trigger middleware for the registered node”. It’s unclear whether this is the intended behavior or if I should also trigger for all parent nodes.2. Unsubscribe not called when unmounting a synced useObservable #624
Changes