Hey Rick

I'm fairly sure the viewTransformDictionary is set to use weak references,
which would mean that an object key held within the dictionary would not be
retained if there was no other references to the object in your application.
are you sure you are clearing all local references to the object? calling
removeChild is not necessarily enough, you must make sure that any
application references to the 3d object are cleared, and only then will it
be flagged for GC


Rob


On Fri, Sep 18, 2009 at 8:11 PM, RickSaada <[email protected]> wrote:

>
> I've been doing profiling on a game I've been working on with away3D,
> and I've been having an issue with loitering objects.  Trying to track
> down what's holding them in memory, I've made sure there are no
> instances in my code to them.  The back reference pane shows that
> Away3D is still keeping references however.  In particular, it appears
> that CameraVarsStore.viewTransformDictionary is never cleared, and
> maintains a reference to any object that's been on screen, even if it
> is no longer part of the scene.
> CameraVarsStore.reset() resets the nodeClassificationDictionary, and
> _sourceDictionary, but it doesn't touch the view TransformDictionary.
> So that ref holds my MovieClipSprite in memory, which holds all the
> MovieClips in memory, etc. etc.  Is this a bug?  Should reset by
> making a new Dictionary(true)  for this as well as the
> nodeClassificationDictionary?  The viewTransformDictionary is used by
> various places (LOD, PointLight, etc) and I'm not sure it would get
> properly rebuilt each frame.  Should there be a way to explicitly
> remove it from the dictionary when the object is removed from the
> scene (say whey it's parent becomes null?)
>
> Thanks,
>
> Rick
>
>


-- 
Rob Bateman
Flash Development & Consultancy

[email protected]
www.infiniteturtles.co.uk
www.away3d.com

Reply via email to