xml3d / xml3d.js

The WebGL/JS implementation of XML3D
Other
75 stars 25 forks source link

Memory leak in asset overwrites #142

Closed stlemme closed 8 years ago

stlemme commented 9 years ago

When frequently adding and removing assets together with overwriting asset properties, a memory leak appears that grows rather fast.

An example showcasing this issue is available at https://stlemme.github.io/xml3d-experimental/memory-leak/memory-benchmark-test.html (caution!)

csvurt commented 9 years ago

I've tracked this down to the way dataflows inside assets are disposed (or rather aren't). The substitution nodes are never removed so you eventually end up with thousands of mesh data buffers.

I'll work on a fix for this for v4.9.4

csvurt commented 8 years ago

A bunch of fixes just made their way onto the master branch as part of the 4.9.4 release. The test scene you provided stays at a nice ~50 mb for me now!

I'll close this now, if you run into any other leaks feel free to open it up again.