views:

204

answers:

2

Hello,

I am building a website which loads some collada objects for each area.
But I couldn't manage to clean the memory. It seems impossible to kill the objects.

I've found some samples implementing destroy() methods for away3d internal classes, but they're not working as well.

I really don't know if this is a problem with player's garbage collector or with away3d itself.

Any ideas?

+1  A: 

Grant Skinner figured out an unsupported way of Forcing Garbage Collection, maybe try that out and see if memory usage decreases? If not, it's at least not the flash player.

try {
   new LocalConnection().connect('foo');
   new LocalConnection().connect('foo');
} catch (e:*) {}
// the GC will perform a full mark/sweep
// on the second call of new LocalConnection().connect().

Best, Lance

viatropos
Thanks for your answer. This will be very useful. But it stills in memory.
goo
+1  A: 

I'm pretty sure the problem is with Away3D and not the garbage collector. I've had a similar issue and after a lot of searching I just had to deal with the memory leak and try to stop it from getting out of hand by recycling the objects/pooling.

You can see that memory leaks are actively discussed on the forums but there hasn't been much in the way of easy fixes: http://groups.google.com/group/away3d-dev/browse_thread/thread/3d31808f4d50f0d2/0ef840a2395f3783?lnk=gst&q=memory#0ef840a2395f3783

ThunderChunky_SF