[osflash] A interesting useWeakReference Test

Keith Peters kp at bit-101.com
Fri Feb 22 09:55:08 PST 2008


Did you try forcing GC using the local connection hack?

Keith Peters
kp at bit-101.com



On Feb 22, 2008, at 12:44 PM, Rich Shupe wrote:

> Hmmm. After several dozen tries, I've only been able to get the anon  
> func
> collected once. I guess that shows that they can be collected, and is
> another example of why weak references are no substitution for  
> removing
> listeners.
>
>
> On 2/21/08 8:25 PM, "iiley" <iiley.chen at gmail.com> wrote:
>
>> I think Rich Shupe's point is not right, anonymous function of  
>> course can be
>> collected if it is not referenced. Try to run my test code in my  
>> third post,
>> it is a Timer never stops, but the tick trace will stop, so it  
>> prove that the
>> ano function is collected.
>
>
>
> _______________________________________________
> osflash mailing list
> osflash at osflash.org
> http://osflash.org/mailman/listinfo/osflash_osflash.org




More information about the osflash mailing list