I’ve search everywhere and tried everything but can’t fix this.
If I create a simple onEnterFrame function as this everything is okay.
private var _cube:Cube;
private function onEnterFrame(ev : Event) : void
{
_view.render();
_view.scene.removeChild(_cube);
_cube.dispose();
_cube = null;
System.gc();
_cube = new Cube();
_view.scene.addChild(_cube);
}
Running this is fine but as soon as I use “new Cube(myTexture)” the memory usage just keeps climbing.
What is the proper method of disposing an object with a texture?
I’ve tried using Away3d 4.0 and the new 4.0a in git as of today, both have the same problem. (Edit: for v4.0 I use dispose(true) )
I’m only using Flex SDK so I don’t have an expensive debugger to see where the problem is.
Thanks.