antvis / antvis/L7

内存溢出问题

Open
#2,280 3 comments 3 reactions 2 assignees Claimed by @lzxue View on GitHub
good first issue
Dominant language
TypeScript
Stars
4.1k
Forks
656
PR merge metrics
No merged PRs in 30d

Description

### 问题描述

使用`new L7.Scene`和`new GaodeMap`创建地图实例,调用`scene.destroy()`后,打开chrome开发者工具内存一栏,点击垃圾回收后,拍摄堆快照,搜索`layer`和`scene`可以看到大量对象并未被释放
![image](https://github.com/antvis/L7/assets/38043552/a6fefe12-ab79-4cd4-a041-6beeefce3adf)
![image](https://github.com/antvis/L7/assets/38043552/50d22697-ae05-463f-93bf-0e5624137730)

### 重现链接

https://codesandbox.io/p/sandbox/hungry-sid-yj4ylr?file=%2Fpackage.json

### 重现步骤

进入页面等加载完就可以垃圾回收拍摄堆快照了,拍之前记得要选中*.csb.app那个

### 预期行为

layer等对象应该被释放,scene在持有它的引用销毁后也应该被释放

### 平台

- 操作系统: [Windows.]
- 网页浏览器: [Google Chrome]

### 屏幕截图或视频(可选)

_No response_

### 补充说明(可选)

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.