I'm seeing a major memory leak with table destruction, in 0.7.2

In our qooxdoo application we have a viewer which instantiates a handler
for particular types of objects. The handler is in charge of displaying
the object. The viewer disposes and instantiates a new handler when the
object selection changes. 

In a common case, the handler uses a table object (with our own remote
data model and custom row and cell renderers). When changing viewed
objects we're seeing a considerable memory leak, of the order of 1.3MB in
IE7. 

I modified qx.dev.ObjectSummary.getInfo to show a delta - i.e. only those
object types which increased in count were shown in the report. This
revealed that there were three objects not being disposed when the table
object was disposed:

024625 DEBUG: abling.fragment.CViewer[608]: Summary: (1922 Objects) 
1: qx.ui.table.pane.Model 
1: qx.ui.table.columnmodel.Basic 
1: qx.ui.table.selection.Model 

Taking qx.ui.table.selection.Model as an example, it is created in
qx.ui.table.Table property newSelectionModel() and is stored in the Table
property selectionModel. 

But there's no call to dispose it. If I add code in the Table destructor
to dispose it (as well as removing the event listener) then it no longer
appears in the list of objects.

If I do this for the other objects they don't appear in the list of
leaked objects. However, I still get memory increasing in IE which might
be due to circular references.

Some questions:

1. How are these objects supposed to be disposed? Have I misunderstood
the mechanism for property destruction?

2. Under what circumstances is it necessary to call removeEventListener?
It seems that there are circumstances in the code where it's not called.

3. Have other people seen problems in the table destruction or is our use
not typical (regular instantiate - destruct)?

Hugh

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to