Hi I am trying to figure out how to destory objects in qooxdoo app. Code of
my class looks as follow
/**
* Error window with ok button
*/
qx.Class.define("main.ErrorWin", {
extend : qx.ui.window.Window,
/**
* Constructor
* @param text {String} text to be displayed in window
*/
construct : function(text) {
this.base(arguments, "Error");
this.setModal(true);
this.setShowMaximize(false);
this.setShowMinimize(false);
this.setMinWidth(300);
this.setMaxWidth(800);
this.addListener("resize", this._center , this);
var text = new qx.ui.basic.Atom(text,
"main/Status-dialog-error-icon.png");
text.setRich(true);
var mainLayout = new qx.ui.layout.VBox();
var buttonBarLayout = new qx.ui.layout.HBox();
var buttonBar = new qx.ui.container.Composite(buttonBarLayout);
var button = new qx.ui.form.Button("OK");
button.addListener("execute", this.close, this);
buttonBarLayout.setAlignX("right");
buttonBar.add(button);
this.setLayout(mainLayout);
this.add(text);
this.add(buttonBar);
this.addListener("close", this.clean, this);
qx.util.DisposeUtil.disposeTriggeredBy(button, buttonBar);
qx.util.DisposeUtil.disposeTriggeredBy(buttonBarLayout, buttonBar);
qx.util.DisposeUtil.disposeTriggeredBy(buttonBar, this);
qx.util.DisposeUtil.disposeTriggeredBy(text, this);
qx.util.DisposeUtil.disposeTriggeredBy(mainLayout,this);
},
statics : {
/**
* Shows error window with text
*
* @param text {String} text to be shown in window
*/
showError : function(text) {
var errwin = new main.ErrorWin(text);
var doc = qx.core.Init.getApplication().getRoot();
doc.add(errwin);
errwin.open();
}
},
members : {
/**
* Center window on screen
*/
_center : function(){
this.center();
this.removeListener("resize", this._center, this);
},
clean : function(){
this.debug("closing");
this.close();
this.getLayoutParent().remove(this);
this.debug("closing");
qx.event.Timer.once(function(){
this.debug("dispose");
this.dispose();
}, this, 5);
}
}
}
);
even I tried to dispose all created objects, each instance of this class
results in 2 undisposed objects. Have I missed something or is it a bug?
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/Memory-leaks-tp7586874.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel