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

频繁加载卸载地图可能造成内存泄漏导致浏览器崩溃问题。 #213

Open
jaywcjlove opened this issue Mar 1, 2022 · 4 comments

Comments

@jaywcjlove
Copy link
Member

jaywcjlove commented Mar 1, 2022

image

这个问题看上去可能是 SDK 本身造成的。

instance.destroy();
instance.clearMap();
instance.clearInfoWindow();
instance.clearLimitBounds();

通过使用 iframe 刷新理论上可以解决这种问题。

@jaywcjlove
Copy link
Member Author

@jaywcjlove
Copy link
Member Author

image

@jaywcjlove jaywcjlove pinned this issue Mar 3, 2022
@gonganruyi
Copy link

官方已经回复:将地图版本提升到 2.0.5 有明显改善

@jaywcjlove
Copy link
Member Author

@gonganruyi
示例:https://codesandbox.io/embed/uiwjs-uiw-issues-717-ig91j7?fontsize=14&hidenavigation=1&theme=dark

<APILoader version="2.0.5" akay="a7a90e05a37d3f6bf76d4a9032fc9129">
  <Demo />
</APILoader>

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