Every time I upload a dicom file, the memory grow up. How can I clean the memory of the old ones
Memory keep growing if I load a new dicom file
178 Views Asked by Simon Fan At
2
There are 2 best solutions below
0
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...
You can see various examples of how to free the memory on the examples code, example on the loader:
Another one:
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