Roggie
Roggie

Reputation: 1217

Does Firebase ref.removeAllObservers() also remove child observers recursively?

I have seen a few questions about this but none of them really confirms my query.

If I .removeAllObservers() at a parent node, does this also recursively remove all other observers that may have been attached at all child nodes and childs-of-child nodes etc...recursively?

Upvotes: 0

Views: 145

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317657

The API documentation for removeAllObservers() states:

Removes all observers at the current reference, but does not remove any observers at child references. removeAllObservers must be called again for each child reference where a listener was established to remove the observers.

This should be unambiguous.

Upvotes: 1

Related Questions