[Papervision3D] Stacking memory usage
Aurelplouf
aurelplouf at gmail.com
Tue Nov 11 16:51:42 PST 2008
I am still not very clear on how to to remove the ENTER_FRAME events and the
DisplayObjects completely.
On Kirupa,
I got a suggestion about adding the movieclips and the SWF into an Array.
And then remove them from the array each time I wish to remove these
objects. But I am not sure it will completely remove the old swf from the
memory.
If I can get an thourough explanation about how to remove the ENTER_FRAME
events and Children DisplayObjects, I would be very thankful, especially
that on each page of my website, I load 100 planes with colormaterials as a
background texture ;).
Thank you in advance
Aurel
Gil Birman wrote:
>
> - ENTER_FRAME events and timers will not be removed/stopped unless they
> are
> removed/stopped explicitly (ie removeEventListener() for every
> addEventListener).
>
> - Children DisplayObjects don't get removed just because the parent was
> removed -- you need a removeChild() for every addChild()
>
> - Expect an Object to get garbage collected only when there are NO
> references to that object.
>
> A suggestion is to create a destroy() function for every object.... have
> parents call their children's destroy() functions.
>
> Keep in mind Garbage Collection won't effect speed unless you are using a
> lot of memory.
> Papervision loops, timers, and other ENTER_FRAME listeners will certainly
> effect speed, so focus on these first.
>
> hope that helps
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
--
View this message in context: http://www.nabble.com/Stacking-memory-usage-tp20416887p20451909.html
Sent from the Papervision3D mailing list archive at Nabble.com.
More information about the Papervision3D
mailing list