Firebase ref.removeAllObservers()还会递归地删除子观察者吗?

编程入门 行业动态 更新时间:2024-10-24 12:30:37
本文介绍了Firebase ref.removeAllObservers()还会递归地删除子观察者吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经看到了一些与此相关的问题,但是没有一个问题能真正证实我的查询.

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

如果我在父节点上.removeAllObservers(),这是否也递归地删除了可能已附加在所有子节点和子节点等上的所有其他观察者?

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?

推荐答案

removeAllObservers() 状态:

删除当前引用处的所有观察者,但不删除 引用儿童的任何观察员.必须调用removeAllObservers 再次针对建立听众的每个儿童参考 删除观察者.

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.

这应该是明确的.

更多推荐

Firebase ref.removeAllObservers()还会递归地删除子观察者吗?

本文发布于:2023-11-06 01:29:10,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1562383.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:递归   观察者   还会   Firebase   ref

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!