You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resources are cached in an optimized data structure because they can be used from multiple places inside the scene. The resource manager should track all users of a resource and free the cached resource as soon as no user exists for the resource anymore.
The text was updated successfully, but these errors were encountered:
This behavior is the intended behavior of XML3D, thus it is a bug if resources are not unloaded automatically.
Due to many locations where we cache resources for performance reasons and the lack of weakmaps until recently, the garbage collector is not able to free all resources.
TODO: Check all locations where resources are cached and replace objets with WeakMap where appropoate
We identified a lot of areas where stray references were preventing garbage collection of resources after elements were removed from the DOM. This was improved quite a bit in 5.1, memory profiling in Chrome is now relatively stable even when adding and removing hundreds of elements per second.
Resources are cached in an optimized data structure because they can be used from multiple places inside the scene. The resource manager should track all users of a resource and free the cached resource as soon as no user exists for the resource anymore.
The text was updated successfully, but these errors were encountered: