3.2.0

Leak with XMLHTTP

I've been experiencing some memory issues in IE using Active.HTTP.Request in parts of a project that don't use the grid. If you check the memory increase, its not that large, but continuous requests start slowing down as 30-40 are requested from the same page.

I tried the following, and it seemed to eliminate the issue in my case, although I am not 100% sure. Alex, do you see any problems with my addiing the following three lines to Active.HTTP.Request? So far I have not seen any issues.

#
function wait(){
if (self._http.readyState == 4) {
self._ready = true;
returnResult();
// next three lines added to address memory issue
delete self._http['onreadystatechange'];
self._http = null;
self = null;
}
else {
self.timeout(wait, 400);
}
}
#
Alex
June 10,
I guess there might be a problem if the server never responds - in this case the timeout loop runs continuosly and the memory is not released.

The next line I don't understand:
delete self._http['onreadystatechange'];
becuse I am not using onreadystatechange callback - but timeout loop instead.

The other two seem reasonable but I cannot explain why this could help:
self._http = null;
self = null;

Alex (ActiveWidgets)
June 10,

This topic is archived.

See also:


Back to support forum