Home > Flex > Flex 3 Profiler = Life saver

Flex 3 Profiler = Life saver

July 22nd, 2008

Did some testing with Papervision 3D – Great White (2.0), strangly when I change my dataProvider for the Menu the memory kicks up a bit and never goes down. Tried to add weak listeners and nothing worked.

Then I started to look at the Profiler, by setting a “Memory Snapshot” in the end after a lot of clicking I can compare the 2 Snapshots and saw that the 2 classes RenderRecStorage and Vertex3DInstance was never collected by the garbage collector.

Using Flex 3 I can search All Files in the project and noticed that it’s the BitmapMaterial class that is never destroyed, even if I remove the DisplayObject3D;s from the Scene.
So I simply put all the material in a Array and when removing the DisplayObject3D from stage I make sure that I run *.destroy(); on the BitmapMaterial classes.

So this is how it looked like before.

papervision3d-profiler2

And now. Problem solved, the memory profile looks like it should :)

papervision3d-profiler

Flex ,

  1. No comments yet.
  1. No trackbacks yet.