alibaba / lowcode-engine

An enterprise-class low-code technology stack with scale-out design / 一套面向扩展设计的企业级低代码技术体系
https://lowcode-engine.cn
MIT License
14.66k stars 2.55k forks source link

无效的取消监听代码,严重时会导致内存泄漏,上方.on()绑定的是一个匿名函数,这里解绑的是匿名函数内部调用的函数,不是同一个对象 #3079

Open lilele45 opened 3 months ago

lilele45 commented 3 months ago

https://github.com/alibaba/lowcode-engine/blob/f6305c2284950d79b9729781f081f24f113de345/packages/shell/src/api/skeleton.ts#L162 https://github.com/alibaba/lowcode-engine/blob/f6305c2284950d79b9729781f081f24f113de345/packages/shell/src/api/skeleton.ts#L170 https://github.com/alibaba/lowcode-engine/blob/f6305c2284950d79b9729781f081f24f113de345/packages/shell/src/api/skeleton.ts#L178 https://github.com/alibaba/lowcode-engine/blob/f6305c2284950d79b9729781f081f24f113de345/packages/shell/src/api/skeleton.ts#L191 https://github.com/alibaba/lowcode-engine/blob/f6305c2284950d79b9729781f081f24f113de345/packages/shell/src/api/skeleton.ts#L204 https://github.com/alibaba/lowcode-engine/blob/f6305c2284950d79b9729781f081f24f113de345/packages/shell/src/api/skeleton.ts#L217