Nick,
Ok, thank you for your feedback. I think I know what the issue is in
some of these cases.
The property system automatically handles the dispose of assigned
qooxdoo objects if the value defined with the property "check" is known.
Disposing in this case means that the element key will be deleted from
the object. This will remove the reference to it, but do not mean to
dispose the object itself. I think for the property system this is the
only working way. However this also means that developers of widgets
should increase their attention while developing with sub-widgets which
are directly applied to a property. A common error prone construction
would be something like this in the constructor:
this.setToolTip(new qx.ui.popup.ToolTip("Hello world"));
The reference to the tooltip is only available in the property. The
developer need to specialy handle the dispose of the values of these
properties. However this could not be handled with the property system
e.g. the user of the widget can theoratically later change the value to
some shared instance e.g.
obj.setToolTip(application.sharedToolTip);
This shared value must not be disposed in this case. I would say that
there is no other option than to store an additional reference to the
objects which is assigned to the property:
this.__toolTip = new qx.ui.popup.ToolTip("Hello world");
this.setToolTip(this.__toolTip);
and then add this to the destructor:
this._disposeObjects("__toolTip");
Please open bug reports for all cases you find. Maybe you can even fix
the cases and commit it to SVN. If you have further questions and
problems feel free to send them to the list.
Thanks.
Sebastian
Nick Glencross schrieb:
> Hi!
>
> I've been checking for memory leaks in my application by instantiating
> and disposing pretty large forms, and checking for Objects that leak.
>
> A few of the standard Widgets seem to have some problems:
>
> Calendar:
>
> * This one leaks 4 tooltips (which internally use plenty more each)
> * It leaks a DateFormat
> * There are also lots of LocalizedStrings leaking.
>
> Table:
>
> * The Table might be leaking many of its backend Widgets, such as
> the model, although I've been inspecting the code closely, and I can't
> see why as it seems to be trying to clean itself up properly
>
> Another odd problem is that the focus tabbing is broken after
> disposing a form which uses the DateChooserButton, and then opening
> another. You get an error:
>
> 415038 ERROR: qx.event.handler.EventHandler[59]: Failed to dispatch
> key event: TypeError - children has no properties at
> qx.event.handler.FocusHandler:294
>
> At the moment I'm seeing these symptoms in a large application, so
> haven't got any small test cases, but I'll work on some to demonstrate
> some of the later cases.
>
> Regards,
>
> Nick
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel