More information about the Underscore mailing list

[_] Javascript removeChild and event listeners

Iwein Dekoninck iwein at 3sixty.co.uk
Mon Oct 2 13:03:52 BST 2006


> > Quick question: removing a child node, does this also
> remove any event
> > listeners defined on said child or children of said child? Or is it
> > wise to remove any event listeners before removing said child to
> > prevent memory leaks?
>
>
> Sounds like a 'garbage collection' issue to me -- a concept
> which I think it alien to JavaScript. So probably best if
> you do clean things up manually before removing the node.

Wot I thought. Cleaning up manually is certainly not going to hurt. I
shall go with that.

i