Right, that part I do understand and am not really surprised by. The part I
don't get is why that anonymous function has any effect on the other event
listener at all. The only possible connection between the two is the
eventDispatcher or maybe in some way because they are both "use weak
referenced" (maybe a dictionary containing all weak references)?



On 2/21/08, Rich Shupe <[EMAIL PROTECTED]> wrote:
>
> No, Steve, you're understanding correctly.
>
> The weak reference process can't free up the function for GC because it's
> anonymous. I don't think this is wrong though, because it makes sense that
> the anon function can't be marked for collection.
>
>
> On 2/21/08 12:28 PM, "Steve Mathews" <[EMAIL PROTECTED]> wrote:
>
> > I looked at my code again just now and noticed that there is something
> strange
> > going on here. I my example if you use the anonymous function as the
> timer
> > handler, the click event NEVER gets GCed. Yet in my example, the two
> events
> > have no relation to each other. It is almost like the anonymous function
> lives
> > in the event system and because it can't be GCed all events can't (by
> weak
> > reference at least). This seems very wrong, and hopefully I am just
> > misunderstanding something.
>
>
>
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to