DEP0163:channel.subscribe(onMessage),channel.unsubscribe(onMessage)


【DEP0163: channel.subscribe(onMessage), channel.unsubscribe(onMessage)

类型:弃用已撤销

【Type: Deprecation revoked】

这些方法已被弃用,因为如果用户没有对通道对象进行强引用,它们的使用可能会使通道对象容易被垃圾回收。之所以撤销弃用,是因为当通道有活跃的订阅者时,通道对象现在对垃圾回收具有抗性。

【These methods were deprecated because their use could leave the channel object vulnerable to being garbage-collected if not strongly referenced by the user. The deprecation was revoked because channel objects are now resistant to garbage collection when the channel has active subscribers.】