Hi all
Here is what the doc are saying about this function
"Empties an Element of all its children, removes and garbages the
Element. Useful to clear memory before the pageUnload."
But ... this is not clear (at least for me ^_^ )
Suppose I have this DOM subtree ...
<div id="father">
<div id="resize_handle">
<div id="custom_handle">
</div>
Suppose 'father' is Drag resizable, by his 'resize_handle' handle.
Suppose also I've attached a custom event on 'custom_handle' , for
example on "click" event to "foo" function
What is the best way of destroy this composite element? Does destroy
also takes care of events or do I have to manually do it?
I did this way
var ref = $('father').makeResizable ...
....
ref.detach();
$('custom_handle).removeEvent('click',foo);
$('father').destroy();
Or I could simply do $('father').destroy() without fear of memory
leaks?
Thank you
// destroy panel with children recursively
$(id).destroy();