Hi,
It seems I constantly leave behind objects using my app (not my objects
sadly). To track the cause down, here is a simple demo. Opening a simple
window with just one control makes qx.html.Decorator appear and stay. Please
run the app, press Info and see object summary:
7: qx.html.Element
5: qx.html.Decorator
...
then press Test button and see this:
44: qx.html.Decorator
7: qx.html.Element
...
As you can see qx.html.Element is at the same amount (because of disposing
new ones), but qx.html.Decorator number is growing (I didn't make them).
Can you explain what is causing decorators stay alive?

Here's the code:

qx.Class.define("memtest.Application", {
extend : qx.application.Standalone,
events : {
"killWindow" : "qx.event.type.Data"
},
members : {
main : function() {
this.base(arguments);
qx.log.appender.Native;
qx.log.appender.Console;
this.addListener("killWindow", function(e) {
var win = e.getData();
win.close();
win.destroy();
win.dispose();
}, this);
var doc = this.getRoot();
var button1 = new qx.ui.form.Button("Test Button");
doc.add(button1, {
left : 100,
top : 50
});
button1.focus();
button1.addListener("execute", function(e) {
for (var k = 0; k < 10; k++) {
var window = new qx.ui.window.Window("Test window: " + (k + 1));
window.setLayout(new qx.ui.layout.Canvas());
var button = new qx.ui.form.Button("OK");
button.addListener("execute", function(e) {
this._this.fireDataEvent("killWindow", this.window);
button1.focus();
}, {
"_this" : this,
"window" : window
});
window.addListenerOnce("appear", function(e) {
this.button.execute();
}, {
"button" : button
});
window.addListenerOnce("close", function(e) {
var arr = this.window.removeAll();
for (var k = 0, l = arr.length; k < l; k++) {
arr[k].destroy();
arr[k].dispose();
}
}, {
"window" : window,
"button" : button
});
window.add(button);
window.show();
}
}, this);
var button2 = new qx.ui.form.Button("Info Button", null);
doc.add(button2, {
left : 100,
top : 150
});
button2.addListener("execute", function(e) {
this.debug(qx.dev.ObjectSummary.getInfo());
}, this);
}
}
});

TIA,


--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/qx-html-Decorator-elements-not-disposed-tp7580317.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to