alibaba / alibaba/lowcode-engine

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

Open
#3,079 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
15.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Open packages/shell/src/api/skeleton.ts and inspect the listener registrations and removals at lines 162, 170, 178, 191, 204, and 217. Trace each on/off pair and verify that cleanup uses the registered callback reference; done means every listener can be removed without retaining handlers or causing a memory leak.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.