2

There are 2 answers

0
Lucas OH On

The garbage collector deletes from the memory everything that is not referenced somewhere.

Having a high use of memory even if you don't you the object anymore means there still a reference to it somewhere. Look for a variable that can still access to your old data, including the 3D scene, the AMI stackHelper, the AMI loader...

0
Eduardo Alonso On

You can see various examples of how to free the memory on the examples code, example on the loader:

let loader = new LoadersVolume();
loader.free(); // Free memory
loader = null;

Another one:

let stackHelper = new HelpersStack();
stackHelper.dispose(); // Free memory
stackHelper = null;

I suggest to read the following document to know how garbage collection works on most browsers.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memory_Management