Support - Forum aa

« Back to Support
Beginners Area » Garbage collector

» Garbage collector

Posted on 10.20.2010 by wed, med
Hi, I've been working on flare3d for a while and I find it pretty amazing, thanks folks for this wonderfull software.
My problem is this: After making a set of interactive 3d animations and put them in a flash gallery, I found out that no matter how I do there are always elements stuck on the memory and don't get flushed away by the garbage collector, I nulled the references , removed the children and the event listener , and tried the dispose methode... nothing can seem to kill the 3d elements of the animations. recycling also doesn't work ( I can't to seem to find a good way to recycle a 3d scene within flare 3d to be honest ) :(.
Someone can help me please with that ? or give me some pieces of advice, I would be very gratefull.
|
Share this
 
Reply By wed, med 10.20.2010
Is there a way I can remove a parent sprite without losing the scene ?
I mean what I do when recycling my objects is I put them in an array , I remove them from the display list by removeChild method  and then I add them back again. but whenever I do that for a parent of the flare main class I can't get the scene back right away. I have to rather removing the parents from the display list just set their visible mode to false witch is not practical. is there a way to remove the parents but keep the scene in the child class there in pause state or another inactive state ???
thanks in advance.
Reply By wed, med 10.21.2010
Thank you Nehmad, Ariel for this answer. I ll try removing objects before removing parent movie clip and give feed back :)
Reply By wed, med 10.22.2010
Hi , I tried to free the memory using the beta version source, but it didn't work for me. the memory usage keeps growing each time I load a flare3d file and dispose the scene. here is the code I'm using,

package classes.animations
{
    import flare.basic.Viewer3D;
    import flare.basic.Scene3D;
    import flare.core.Pivot3D;
    import flare.utils.*;
    import flash.display.Sprite;
    import flash.events.Event;

    public class Main extends Sprite
    {
        private var scene:Scene3D;
        private var genLink:String;
       
        public function Main(_genLink:String)
        {
            genLink = _genLink;
            xml3DLoaded();
        }
        // the recycling function
        public function mainRecycle(_genLink:String):void
        {
            genLink = _genLink;
            xml3DLoaded();
        }
        function xml3DLoaded():void
        {
            scene = new Viewer3D(this);
            scene.addChildFromFile(genLink);
        }
        // the destroyer function
        public function eventsKiller():void
        {
            scene.dispose();
        }
    }
}

 if u run it on a flare 3d files of 8000 polygons or so u ll notice that the memory usage keeps growing. Can please somebody tell me what I'm doing wrong or how I can fix it to get the garbage collector to do the job ??
Thanks in advance.
Reply By Nehmad, Ariel 10.22.2010
Hi med, we'll take a look at this as soon as possible.
Reply By wed, med 10.22.2010
Thank you :)
Reply By Alonso, Joseba 11.29.2010
Hi,

Any advance on this? I have the same problem. I use the engine in several parts of my application and i cant recycle the instance because it disposes itself when i reparent it to another sprite. Creating new instances seems to be memory leaking..

I understand that you dispose the scene when the child is removed from stage to protect some people for not calling dispose() explicitly but you should leave an option for advanced users who wants to keep it in memory.

Anyway, is there any beta version or something that solves this? Thanks!
Reply By wed, med 11.29.2010
Well, I'm still waiting for that too. Right now what I'm doing is setting the 3d scenes to invisible and I visible them each time i need to display them , wich is not practical at all but it's the only solution I came up with. :(
Reply By Alonso, Joseba 11.29.2010
yes, im tempted to do the same. Lets see if Flare3d team tells us something before do it... Just a way to avoiding the removeChild disposal will do the trick
Reply By mk, masterkitano 11.30.2010
does anyone knows whats the max ploys that can be used in a flare3d scene? without loosing performance
12Next»Showing 10 of 20