You test code keeps generating new copies of TestDic and adding them to
an array.  That will eventually eat up all memory.

 

The best way to test Dictionary is to use the profiler in Flex Builder
3.

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of iiley
Sent: Tuesday, January 29, 2008 6:29 PM
To: flexcoders@yahoogroups.com
Cc: [EMAIL PROTECTED]
Subject: Re: [flexcoders] Dictionary weakKeys feature or it's a GC bug

 

Hi Alex,

 

Thanks very much for your deep analyse.

 

>Also, I haven't seen your test code

 

I'v posted the test code in first post, well, maybe it's long so you
don't see it, i attached it here again.

In your analyse, there's misunderstood, i mean test2 and test3 methods
in the code:

 

 public function test2():void{
  for(var i:int=0; i<N; i++){
   dic[i+""] = new ComplexObj();
  }
 }
 
 public function test3():void{
  for(var i:int=0; i<N; i++){
   dic[new Object()] = new ComplexObj();
  }
 }

 

(See attached TestDic.as file)

I saw you are from adobe.com, you must be the right guy to answer such
kind of questions, great and thanks very much.
 

Cheers~~

-- 
iiley
AsWing http://www.aswing.org <http://www.aswing.org> 
Personal http://www.iiley.com <http://www.iiley.com>  

 

Reply via email to