i've tried your example and didn't notice any memory leakage. 
anyway, why do you need to create components and remove them, and
create again the same components? It looks like you made up an
artificial problem for yourself :)


--- In [email protected], "e_baggg" <[EMAIL PROTECTED]> wrote:
>
> So I have an app in production which after 10 minutes of usage began 
> to perform EXTREMELY slow, and users had to restart the app. (Flex 3) 
> Windows and Mac...all browsers. I  did some Profiling and did not get 
> far. Whenever I take a Memory Snapshot, gc() is forced and all my 
> objects are correctly removed from memory. So why are they not gc()'d 
> in normal runtime?? I know gc() only runs when new memory is requested 
> and nothing is being drawn/rendered. Both seem to be OK on my side.
> 
> I have read extensively all the blogs and Adobe docs regarding this  
> issue, including the event listener for ENTER_FRAME which calls 
> System.gc() twice. (http://www.craftymind.com/2008/04/09/kick-
> starting-the-garbage-collector-in-actionscript-3-with-air/). This 
> unfortunately did not work for me. 
> 
> To simplify, I created a simple app that adds and removes RichText 
> fields. if I create 50 of them, then remove them all, then Add one 
> back, that *should* force a gc() but it does not. The FF memory always 
> stays high. I noticed in IE, minimizing the browser window causes a 
> gc() and my memory drops to a much lower #.
> 
> 
> Has anyone seen or come across this? B/c of this issue, we're pretty 
> much going to lose our customers and try to wing a html/ajax app 
> ASAP..so I'm scrambling to resolve this. 
> 
> Thanks in advance for any help.  
> 
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
>       creationComplete="init()" layout="vertical" >
> <mx:Script>
>       <![CDATA[
>               import mx.controls.RichTextEditor;
>               
>               private function removeit():void
>               {
>                       this.removeChildAt(2);
>               }
>               
>               private function doit():void
>               {
>                       var rte : RichTextEditor = new 
> RichTextEditor();
>                       rte.width=300;
>                       rte.height=150;
>                       this.addChild(rte);
>               }
>       ]]>
> </mx:Script>
>       <mx:Button click="doit()" label="Add"/>
>       <mx:Button click="removeit()" label="Remove"/>
> </mx:Application>
>


Reply via email to