On 03/19/2014 04:39 PM, Kyle Huey wrote:
> Followup to dev-platform please.
>
> We are discovering a lot of leaks in JS implemented DOM objects.  The
> general pattern seems to be that we have a DOM object that also needs
> to listen to events from the message manager or notifications from the
> observer service, which usually hold strong references to the
> listener.

Can you give a specific example or two to chew on? Preferably something
whose lifetime would optimally be shorter than the containing window's?
Jim Blandy has been giving ideas for certain classes of problems, but I
can't tell how many realistic situations those ideas might address.
Sure, weak refs could solve them all these problems in one fell swoop,
but weak refs (or other observable GC) would also paint us into a corner
and prevent many tuning optimizations.

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to