Skip to content

Promise内存泄漏 #13

@lanjingling0510

Description

@lanjingling0510

return reader.read().then((result) => {

return this.pump(reader);

嵌套的Prosise形成了一个Promise状态链,外层Promise等待内层Promise调用resolve或者reject,因为V8原生的Promise实现存在缺陷,这样使用之后会积累一大坨Promise,无法被释放,所以就造成了内存泄漏。

1

将两个地方的return去掉

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions