Good question, I don't know. In theory, Signal does not require  
disconnect to be called -- it does this for you when the page closes.  
But once you get into tricky stuff like this, it might leak. If  
you've got access to IE, please do me a favor and test this code in  
drip, and let me know how it goes.

Thanks!

On 3-Apr-06, at 4:55 AM, Eric Faurot wrote:

>
> Hi,
>
> I'm using the new Signal module (which is truly awesome, just like the
> rest of MochiKit), and I am wondering if it behaves as I would expect
> in the following scenario:
>
> var n = BUTTON(null, "click me");
> connect(n, "onclick", someHandler);
> appendChildNodes(document.body, n);
>
> // ...
>
> swapDOM(n);
>
> If we suppose I do not hold any reference to 'n' past that line, is
> there possibility of an element (or other source of) leak, due to
> 'disconnect' not being called explicitly?  In other words, is it safe
> to remove DOM elements on which signals are registered, or do I really
> have to call 'disconnect' to drop references held by Signal internals?
>
> Eric.
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---

Reply via email to