Some more information that may be helpful in resolving this.
If I use the following code in an html page with no dependency on Qooxdoo
there are no leaks.
function startXHRComms()
{
callXMLHttpRequest();
callXMLHttpRequest();
callXMLHttpRequest();
setTimeout(startXHRComms, 10*1000);
},
function callXMLHttpRequest()
{
var self = this;
self.xmlHttpReq = new ActiveXObject("MSXML2.XMLHTTP.6.0");
self.xmlHttpReq.open('POST', "url", true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/json');
self.xmlHttpReq.onreadystatechange = function() {
if (self.xmlHttpReq.readyState == 4) {
// do something with the response;
}
};
self.xmlHttpReq.send("{}");
},
Putting the same code into a Qooxdoo skeleton application causes a leak to
occur, code for this context is show below. url and params will need to be
changed for this to work.
__startXHRComms : function()
{
this.__callXMLHttpRequest();
this.__callXMLHttpRequest();
this.__callXMLHttpRequest();
var self = this;
setTimeout(function() { self.__startXHRComms(); }, 10*1000);
},
__callXMLHttpRequest : function()
{
var xmlHttpReq = new ActiveXObject(qx.xml.Document.XMLHTTP);
xmlHttpReq.open('POST', "url", true);
xmlHttpReq.setRequestHeader('Content-Type', 'application/json');
var self = this;
xmlHttpReq.onreadystatechange = function() {
if (xmlHttpReq.readyState == 4) {
self.__lbl.setContent("(completed) " + new Date());
}
};
xmlHttpReq.send("{}");
},
cbrown wrote:
>
> I am currently investigating a memory leak in my application and have
> produced the code included at the end of this message in a skeleton app
> that shows the leak.
>
> The app makes a request to the web service once every 2 seconds, both the
> request and response are small (< 100 characters) and the application is
> growing between 25Kb to 100Kb per call.
>
> I have also tried using the ActiveX XMLHttpRequest object directly from
> within the Application.js file and this exhibits the same growth.
>
> Using the ActiveX XMLHttpRequest object directly in a standalone html page
> with no external libraries doen not exhibit any memory growth.
>
> I would be very grateful for any information as to how this could be done
> in a way that doesn't leak.
>
> The code follows, these methods are all from the Application.js file and
> the skeleton is otherwise unmodified from the example.
>
>
--
View this message in context:
http://n2.nabble.com/Memory-leak-in-IE7-using-qx.io.remote.Rpc-in-0.8.2-tp2686912p2691398.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel