incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maciek Sakrejda <>
Subject Re: JavaScript VS. Weak references
Date Tue, 07 Feb 2012 20:14:40 GMT
Weak references are on the horizon for JS:

> And related to that two questions:
>  1) Does anyone know how browsers avoid memory leaks with addEventListener ?

Not all listeners have to be weak references. If what you're listening
to is eligible for garbage collection, and you have no other
references to your listener, your listener is also eligible. I've seen
a fair amount of cargo-cult distrust for this (not saying your
particular question falls in this category), but this is precisely why
garbage collection works the way it does.

View raw message