Leonardo Azpurua
5/16/2015 2:45:00 PM
Hi,
I have the idea of migrating a large Windows desktop application to the Web.
The browser will be used as a sort of Windows desktop, on top of wich
several "forms" (HTML divs) will be opened and closed.
So far, I have managed to create a DIV, populating it with controls defined
in a JSON object and attach events to these controls. Results are quite
elementary yet, but the basic ideas seem to be pointing in the right
direction.
As things grow, several DIVs will be opened, used, closed and disposed. So
far, my "disposal" is limited to removing the top container element (i.e.
the "form" DIV) from the document (document.removeChild(xDiv)).
My question (which is browser dependent, but there's no better place to ask
browser related questions than here) is: do most "modern" browsers (say
FireFox, Chrome, IE9+, Opera, Safari) automatically handle all the cleanup
of a disposed element (detaching event handlers, freeing graphical
resources, deallocating memory, etc) for all the elemets inside a disposed
control, or is it necessary to provide a function to handle all of it
explicitly?
Regards!