removeObject3D does not de-reference object3D.el
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 17.6k
- Forks
- 4.4k
- PR merge metrics
- No merged PRs in 30d
Description
Description:
I've been tracking down memory leaks and I noticed one stemming from the fact that if you call el.setObject3D("mesh", mesh) and then el.removeObject3D("mesh"), then mesh.el still references the A-Frame element. so if mesh is pinned to memory, so is the entire aframe subtree.
- A-Frame Version: 1.0.3
- Platform / Device: Linux/Chrome
- Reproducible Code Snippet or URL:
Contributor guide
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 tracing the setObject3D and removeObject3D entry points in A-Frame and inspect how the mesh's el reference is assigned and cleared. Reproduce the sequence from the issue, then verify that removing the object no longer retains the element or its subtree, using any existing object3D tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, three.js
- Domain
- computer-graphics, web-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100