Hi Hugh,
Am 24.09.2007 um 17:21 schrieb Hugh Gibson:
> It appears that any remote request using XMLHttpRequest leaks
> memory in
> IE7. In a testcase running here, a regular operation (polling the
> server)
> which has around 5 POST requests sent off in quick succession consumes
> 170 KB. That's around 35 KB per request.
The problem is in this code in the destructor in XmlHttp.js:
// Should be right,
// but is not compatible to mshtml (throws an exception)
if (qx.core.Variant.isSet("qx.client", "mshtml")) {
} else { // empty to help the generator to optimize this variant
vRequest.onreadystatechange = null;
}
Which is just an optimization of the original code from the
legacy_0_6_x branch:
// Should be right,
// but is not compatible to mshtml (throws an exception)
if (!qx.core.Client.getInstance().isMshtml()) {
vRequest.onreadystatechange = null;
}
It seems like someone somewhere got an exception when setting
onreadystatechange to null. Unfortunately, not setting it to null
leaks memory in IE. I've tested it, and I never received an exception
(but could easily see the leak). I would propose to fix it like this:
// Should be right,
// but is not compatible to mshtml (throws an exception)
try {
vRequest.onreadystatechange = null;
} catch (Exception e) {
// never mind
}
In my testing, the leak is gone after this change. However, I don't
want to commit it without some feedback. Under which circumstances
can there be an exception (question to the one who originally checked
this in - I didn't check who it was yet)? Is ignoring the exception
enough, or should we log a warning?
Regards,
Andreas
--
Dipl.-Inform.(FH), M.Sc. Andreas Junghans
STZ-IDA an der Hochschule Karlsruhe
email [EMAIL PROTECTED]
internet http://stz-ida.de
telefon ++49-721-920-3302
fax ++49-721-160-890-56
Moltkestrasse 30, D-76133 Karlsruhe/Germany
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel