删除node.js事件,监听器也消失了?
如果我删除一个 node.js 事件,监听器也会消失,对吗?我不需要删除其他东西吗?
If I delete a node.js event, the listeners go away too right? I don't have to delete anything else?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的意思是删除 EventEmitter 实例? (或者,同样,继承自 EventEmitter 的对象?)
在这种情况下,我认为当您删除对象实例时,每个侦听器也会被删除,它们是对象实例的一部分
You mean deleting an EventEmitter instance? (or, equally, an Object that inherits from EventEmitter?)
In this case I think that each listener would be deleted as well when you delete the object instance, they're part of the object instance