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

Memory Leak on tb.remove() #62

Closed
jscastro76 opened this issue Oct 27, 2020 · 1 comment
Closed

Memory Leak on tb.remove() #62

jscastro76 opened this issue Oct 27, 2020 · 1 comment
Assignees
Labels
🪲 bug Something isn't working
Milestone

Comments

@jscastro76
Copy link
Owner

There’s a clear memory leak when removing objects with tb.remove(), that should be solved on obj.dispose().
We need to review the dispose of the different objects contained in an Object3D (material, geomertries, textures) and the instances this object is copying in AnimationManager (through .enroll), the different members (.boundingBox, .boundingBoxShadow, .model) and other objects such as .label and .tooltip
The only instance to be kept should be the one in the new tb.objectsCache

@jscastro76 jscastro76 added the 🪲 bug Something isn't working label Oct 27, 2020
@jscastro76 jscastro76 added this to the v2.0.7. milestone Oct 27, 2020
@jscastro76 jscastro76 self-assigned this Oct 27, 2020
@jscastro76 jscastro76 changed the title Memory Leak on obj.dispose() Memory Leak on tb.remove() Oct 27, 2020
jscastro76 added a commit that referenced this issue Oct 28, 2020
Minor version by [@jscastro76](https://github.com/jscastro76), some enhancements and bugs.

#### ✨ Enhancements

- [**#54**](#54) vue and threebox,map not defined.
- [**#63**](#63) `CSS2DObject` is not disposing properly.
- Update example [15-performance.html](https://github.com/jscastro76/threebox/blob/master/examples/15-performance.html) to avoid dupplicated calls when dragging the count GUI control.

#### 🪲 Bug fixes

- [**#61**](#61) .userData not refreshed properly on obj.duplicate.
- [**#62**](#62) Memory Leak on tb.remove(). Tested
- [**#64**](#64) Cache instance of a loaded model is disposed when the world children is.
@jscastro76
Copy link
Owner Author

v2.0.7.

jscastro76 added a commit that referenced this issue Nov 2, 2020
Minor version by [@jscastro76](https://github.com/jscastro76), some enhancements and bugs.

#### ✨ Enhancements

- [**#24**](#24) Refactor `obj.deepCopy`, these members must be properties found by name
- [**#54**](#54) vue and threebox,map not defined.
- [**#63**](#63) `CSS2DObject` is not disposing properly.
- [**#66**](#66) `tb.dispose` must now call `tb.clear` and return the async value
- [**#68**](#68) add new methods to remove label & tooltip
- [**#71**](#71) Defer default boundingBox and tooltip creation.
- Update example [15-performance.html](https://github.com/jscastro76/threebox/blob/master/examples/15-performance.html) to avoid dupplicated calls when dragging the count GUI control.

#### 🪲 Bug fixes
- [**#61**](#61) `.userData` not refreshed properly on `obj.duplicate`.
- [**#62**](#62) Memory Leak on `tb.remove()`. Tested
- [**#64**](#64) Cache instance of a loaded model is disposed when the world children is.
- [**#65**](#65) addTooltip and addLabel don't remove previous objects.
- [**#67**](#67) clones have `boundingBoxShadow` line in white.
- [**#69**](#69) After #56 the labels and tooltips are wrongly positioned.
- [**#70**](#70) After #56 object boundingBox has the original cached size.
- [**#72**](#72) After #56 animations are not being cloned.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant