Hi,
In xforms.js, the setInterval for the heartbeat callback (see code below) was created in the context of the XForms document object, meaning it had a reference to a significant number of DOM objects. This creates a circular reference between DOM objects and javascript objects which causes memory leaks in IE6.
if (ORBEON.util.Properties.sessionHeartbeat.get()) {
var heartBeatDelay = ORBEON.util.Properties.sessionHeartbeatDelay.get();
if (heartBeatDelay > 0) {
window.setInterval(function() {
ORBEON.xforms.Events.sendHeartBeatIfNeeded(heartBeatDelay);
}, heartBeatDelay / 10); }
}
Test case:
1. Load a form in an iframe - for some reason, the issue is more evident when the form is in a frame. Use IE6 browser.
2. Open up task manager or any other tool to check the memory usage of IE.
3. Refresh page or reload the form.
4. Check task manager - memory usage goes up everytime you refresh page or reload the form in the iframe.
Attached is a patch for the solution where we extracted the anonymous function from the heartbeat callback so that it will not hold unnecessary reference to objects in the document object.
Thanks,
Anne
--
You receive this message as a subscriber of the
[hidden email] mailing list.
To unsubscribe: mailto:
[hidden email]
For general help: mailto:
[hidden email]?subject=help
OW2 mailing lists service home page:
http://www.ow2.org/wws