Hi.

I am working on 3d furniture viewer. It loads one model that is made
up from 4 obj files. An then comes the tricky part when user clicks on
a button that loads another model (also 4 objs to load).

It's made now that everything works but when i look at the stats panel
I see that every time I load another model the ram usae is increase
~10mb (depends on model). Seems like a small issue but on weaker
computers after viewing some models it starts to make serious
"slideshow" when tried to rotate model.

For loading I use BulkLoader and before every new loading everything
from the old one is cleared.

I guess that something's wrong with removing loaded models from scene.

Here's what I got now:

res.removeAll(); // clear BulkLoader
scene.removeChild(obj); // remove ObjectContainer3D ( where obj_base,
obj_side_1 etc. are stored) then set everything to null.
obj = null;
obj_base = null;
obj_side_1 = null;
obj_side_2 = null;
obj_side_3 = null;

Reply via email to