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.
main : function()
{
this.base(arguments);
var doc = this.getRoot();
var btn = new qx.ui.form.Button("Test Comms");
btn.addListener("click", this.__startRPCComms, this);
this.__lbl = new qx.ui.basic.Label();
doc.add(btn, {left: 0, top: 0});
doc.add(this.__lbl, {left: 0, top: 50});
},
__startRPCComms : function()
{
this.__callRpc();
var self = this;
setTimeout(function() { self.__startRPCComms(); }, 2*1000);
},
__callRpc : function()
{
var method = "serviceMethod";
var url = "serviceUrl";
var service = "service";
var params = {};
var rpc = new qx.io.remote.Rpc();
rpc.setTimeout(40000);
rpc.setUrl(url);
rpc.setServiceName(service);
rpc.addListener("completed", this.__onRpcCompleted, this);
rpc.addListener("failed", this.__onRpcFailed, this);
rpc.addListener("timeout", this.__onRpcTimeout, this);
rpc.addListener("aborted", this.__onRpcAborted, this);
var request = rpc.callAsyncListeners(true, method, params);
},
__onRpcCompleted : function(e)
{
this.__lbl.setContent("(completed) " + new Date());
},
__onRpcFailed : function(e)
{
this.__lbl.setContent("(failed) " + new Date());
},
__onRpcTimeout : function(e)
{
this.__lbl.setContent("(timeout) " + new Date());
},
__onRpcAborted : function(e)
{
this.__lbl.setContent("(aborted) " + new Date());
},
--
View this message in context:
http://n2.nabble.com/Memory-leak-in-IE7-using-qx.io.remote.Rpc-in-0.8.2-tp2686912p2686912.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