Open supermoos opened 8 years ago
It's very possible there's a memory leak. Reusing properly the buffers is in the TODO list. I have to take a closer look at it, and how to dispose of buffers in threejs
Okay, sure thing :-)
fixed in #15
This fix is not working
it doesn't work if count of points in position array changed
Found a memory leak and fixed it in https://github.com/spite/THREE.MeshLine/pull/25/commits/f6c9ba00a1f59d299d12506b9365a1f87525fc78
Basically the this.counters array was getting pushed values every time setGeometry() is called but was never cleared, so it would just keep growing.
Fixed by this.counters = []
at the begining of setGeometry()
First of all, great job, it's a lovely addition to Three.js!
I'm not completely sure, but I think there may be a memory leak somewhere, I tested your spinner demo (basically holding down the mouse and releasing again after a few minutes), in Chrome the memory consumption just goes up and up, and never down again. On another project I'm working on this get's much more apparent since I'm updating the THREE.MeshLine geometry on every frame with the THREE.MeshLine.setGeometry() function.
Please see the attached screenshot for a memory profile, looks like it may have something to do with the WebGLBuffer objects?
Correct me if I'm wrong, just wanted to let you know as I guess you can figure whether there's any hold in this theory pretty fast :-)