maptalks / maptalks/maptalks.gridlayer
vue里的内存泄漏
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
from yumgis:
在vue中,如果按照以下方式添加图层,会有内存泄漏,即内存不正常的增长。
```js
this.gridLayer = new maptalks.GridLayer('bdGridLayer', grid, options).addTo(mapObj);
```
但改成如下方式添加,就是正常的:
```js
this.gridLayer = new maptalks.GridLayer('bdGridLayer', grid, options);
this.gridLayer.addTo(mapObj);
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the memory growth in Vue using the two GridLayer construction and addTo forms shown in the issue. Compare the chained call with the separate call while inspecting the GridLayer addTo path and memory behavior. Done means both forms add the layer without abnormal memory growth.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100