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

Reply via email to