Hey Steve yes, generally it is not a good idea to keep creating and destroying views, as a lot of cached values are stored there. nto so sure that scene would have the same problem, but i guess this has just not been so thoroughly tested.
if you wanted to share your tests on the list, we could use them to possibly improve the situation in future releases? cheers Rob On Wed, Aug 12, 2009 at 3:24 PM, steanson <[email protected]>wrote: > > I find if i loop all children of the scene and remove them, > as well as reusing the view and scene rather than recreating new ones > I seem to avoid memory going off the radar! > > anyone else found this ? > > cheers Steve > > On Aug 11, 1:00 pm, steanson <[email protected]> wrote: > > Hi all, > > I have a sprite that i add to my application that creates the 3D part > > of my application. > > Users can toggle this on and off, and will do often as they make > > changes in the 2D part of the app. > > > > When a user toggles OFF the 3D view: > > The sprite that contains the 3D scene is removed from memory as shown > > by the Flex profiler. > > However my view3D instances are never removed despite being removed > > from stage and nulled. > > All my listeners are removed. > > (I do however cache the materials and bitmap data for reuse) > > What is the best way to handle this kind of thing in away3D, otherwise > > memory use is going to be excessive. > > I notice that there are a huge number of DrawTriangle, Number3D, Face, > > UV objects created that never get garbage collected either > > > > thanks Steve > -- Rob Bateman Flash Development & Consultancy [email protected] www.infiniteturtles.co.uk www.away3d.com
