You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which can be closed if you fulfill this ticket in some way.
The proposal consist of 4 steps to be made:
introduce the node:destroy event
Node.destroy() should fire a node:destroy event.
Node.removeChild(childnode) should fire a node:destroy event for childnode.
Node.replaceChild(node, refnode) should fire a node:destroy event for refnode.
Also, Node.load, Node.setHTML, Node.remove and Node.replace are safe now, because -under the hood- they use some of the three method mentioned before.
Make the eventsystem in a way that all events are listening to the node:destroy event by themself. Once they catch such an event: they need to look up in the domstructure whether the node that fired the node:destroy-event is a parentNode of the Node it was bound to itself. If so: the eventlistener should destroy itself (detach). This way, none of the Node-methods need to have recursive option anymore!
Make Widgets standard listen to node:destroy by design. Once they catch such an event: they need to look up in the domstructure whether the node that fired the node:destroy-event is a parentNode or if its the widgets-boundingBox. If so: the widget should destroy itself.
Define a YUI_config option 'memorySafe' which takes care of Node._instances to do a cleanup when Y.on('node:destroy') is fired. The cleanup should exists of cleaning the Node._instances with all references of the destoyed Node, as well as its children. Because this has a performancehit, 'memorySafe' should be made an option. Anyone who need speed can set this off while anyone who need a rocksolid app can set it on.
The text was updated successfully, but these errors were encountered:
Actually, this is a whole picture of managing memoryleaks related to Node.
It also consists issues
#547
#549
#560
#551
which can be closed if you fulfill this ticket in some way.
The proposal consist of 4 steps to be made:
Node.destroy() should fire a node:destroy event.
Node.removeChild(childnode) should fire a node:destroy event for childnode.
Node.replaceChild(node, refnode) should fire a node:destroy event for refnode.
Also, Node.load, Node.setHTML, Node.remove and Node.replace are safe now, because -under the hood- they use some of the three method mentioned before.
Make the eventsystem in a way that all events are listening to the node:destroy event by themself. Once they catch such an event: they need to look up in the domstructure whether the node that fired the node:destroy-event is a parentNode of the Node it was bound to itself. If so: the eventlistener should destroy itself (detach). This way, none of the Node-methods need to have recursive option anymore!
Make Widgets standard listen to node:destroy by design. Once they catch such an event: they need to look up in the domstructure whether the node that fired the node:destroy-event is a parentNode or if its the widgets-boundingBox. If so: the widget should destroy itself.
Define a YUI_config option 'memorySafe' which takes care of Node._instances to do a cleanup when Y.on('node:destroy') is fired. The cleanup should exists of cleaning the Node._instances with all references of the destoyed Node, as well as its children. Because this has a performancehit, 'memorySafe' should be made an option. Anyone who need speed can set this off while anyone who need a rocksolid app can set it on.
The text was updated successfully, but these errors were encountered: