Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

内存泄漏 #1346

Closed
The-End-Hero opened this issue Apr 15, 2021 · 3 comments
Closed

内存泄漏 #1346

The-End-Hero opened this issue Apr 15, 2021 · 3 comments

Comments

@The-End-Hero
Copy link

maptalks's version and what browser you use?

0.49.2

Issue description

分批添加marker,之后删除,在layer的geolist上仍然保留引用
内存泄漏

Please provide a reproduction URL (on any jsfiddle like site)

https://codepen.io/the-end-hero/pen/WNRJoxM?editors=1010

@fuzhenn
Copy link
Member

fuzhenn commented Apr 15, 2021

谢谢提issue。
不过奇怪,我这里运行示例的结果是正确的:
image

@The-End-Hero
Copy link
Author

打开控制台,刷新几次,会有比较大的概率出现保留引用的情况。

@fuzhenn
Copy link
Member

fuzhenn commented Apr 15, 2021

已经重现了,原因是marker设置了zIndex,但因为下一帧才会排序的性能优化,导致removeGeometry时,geometry没有在正确的顺序上,所以折半查找没有找到这个geometry。

已经修改并发布了新版本,0.49.3

@fuzhenn fuzhenn closed this as completed Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants