I get the same warnings ;)

Tobias

-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Fink, Andreas
Gesendet: Freitag, 6. Juni 2008 11:01
An: qooxdoo Development
Betreff: Re: [qooxdoo-devel] destruct() question

Hi,

I think I have to jump in this discussion.
I've a problem with memory usage of my qooxdoo application too and tried the 
mentioned hints.
If I use the additional options in the make file to show the missing destruct 
definitions, the only messages I see, come from the framework itself:

035443 DEBUG: testgui.Report[1004]: Disposing: [object 
testgui.Report]FireBug.js (line 75)
Missing destruct definition for '_scroller' in 
qx.ui.table.pane.FocusIndicator[1111]: [object qx.ui.table.pane.Scroller]Log.js 
(line 557)
Missing destruct definition for '_lastMouseDownCell' in 
qx.ui.table.pane.Scroller[1083]: [object Object]Log.js (line 557)
035708 DEBUG: testgui.Report[1567]: Disposing: [object 
testgui.Report]FireBug.js (line 75)
Missing destruct definition for '_scroller' in 
qx.ui.table.pane.FocusIndicator[1654]: [object qx.ui.table.pane.Scroller]Log.js 
(line 557)
Missing destruct definition for '_lastMouseDownCell' in 
qx.ui.table.pane.Scroller[1629]: [object Object]Log.js (line 557)
035942 DEBUG: testgui.Form[2191]: Disposing: [object testgui.Form]FireBug.js 
(line 75)
Missing destruct definition for '_data' in qx.ui.form.ComboBoxEx[2370]: 
1,Laptop,Laptops verschiedener Hersteller,2,Lenovo,Laptops der Firma 
Lenovo,13,Dell,Laptops der Firma Dell,14,Twinhead,Laptops der Firma 
Twinhead,15,Apple,Laptops der Firma Apple,16,Fujitsu Siemens,Laptops der Firma 
FSC,17,AfB Unna,Laptops für Projekt unit21Log.js (line 557)
036192 DEBUG: testgui.Form[2627]: Disposing: [object testgui.Form]FireBug.js 
(line 75)
036394 DEBUG: testgui.Form[3306]: Disposing: [object testgui.Form]FireBug.js 
(line 75)
Missing destruct definition for '_dateFormat' in 
qx.ui.component.DateChooserButton[3579]: [object 
qx.util.format.DateFormat]Log.js (line 557)
Missing destruct definition for '_dateFormat' in 
qx.ui.component.DateChooserButton[3666]: [object 
qx.util.format.DateFormat]Log.js (line 557)
036566 DEBUG: testgui.Report[4458]: Disposing: [object 
testgui.Report]FireBug.js (line 75)
Missing destruct definition for '_scroller' in 
qx.ui.table.pane.FocusIndicator[4545]: [object qx.ui.table.pane.Scroller]Log.js 
(line 557)

Could anyone give me a hint if these missing destruct definitions are my fault? 
Or if a qooxdoo developer has to look at their destructors ;)
I'm using qooxdoo 0.74-pre (actual checkout from repository).

Greetings,
Andreas

-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von thron7
Gesendet: Donnerstag, 5. Juni 2008 14:38
An: qooxdoo Development
Betreff: Re: [qooxdoo-devel] destruct() question

Kanugula,

> I followed the link and tried the 1st option "Enable the debug code". After
> rebuilding the source script, I didn't see anywhere in the log showing
> object distruction.

No, that's true. The settings described on the Wiki page are only a 
preparation to see more *iff* the desposer acutally runs, e.g. on page 
unload. I haven't tried to see that, might be a bit tricky to follow in 
e.g. Firebug. What I always did was to trigger the desposer 
*deliberately*, e.g. in the Firebug command line entering 
"qx.core.Object.dispose()" (this gets mentioned a bit further down the 
wiki page). So without unloading the page you are running the disposer. 
This effectively disables your application, but should give you quite a 
bit of log comments of the disposer's work and findings. Give it a try. 
If you don't use Firebug, you can use any other Javascript shell utility 
that has access to the current page.

>  Does it right anything in the log file? The document
> doesn't say clearly where to check the destructed objects.
>   

As I said, Firebug is a good place to watch the messages.

> By the way, I am talking about our application which is similar to Demo
> Browser application. Should I turn-on profiling or something else to see the
> which objects are destroyed? I use FF in source version.
>   

No, profiling won't help you much here, since it is only classical 
runtime profiling (like which method was invoked how many times, how 
long it took, etc.).

Thomas

> Thanks.
> Kanugula.
>
>
> thron7 wrote:
>   
>> kanugula wrote:
>>     
>>> Hi,
>>>
>>> Using Demo Browser terminology for simplicity.
>>>
>>> If I have something like
>>> var window = new qx.ui.window.Window();
>>> var group = new qx.ui.groupbox.GroupBox();
>>> var label = new qx.ui.basic.Label();
>>> group.add(label);
>>> window.add(group);
>>>
>>> this.window=window;
>>> this.group=group;
>>> this.label=label;
>>>
>>> 1) Is it enough to just destruct "window" object only, instead of all the
>>> underlying so many tiny objects like group, label,e.t.c.
>>> destruct : function()
>>> {
>>>    this._disposeObjects("window");
>>> }
>>>   
>>>       
>> No. As a rule of thumb, you have to dispose everything you attached to 
>> 'this'. The '_disposeObjects("window")' call would really just dispose 
>> the 'window' object.
>>
>>     
>>> 2) Wouldn't it be nice to have the above functionality in
>>> disposeObjectDeep("window", 1) where the object will recursively look for
>>> its elements, not only for Maps and Arrays as per the framework code.
>>>   
>>>       
>> Actually, I would have expected it does just that, disposing referenced 
>> objects recursively. Doesn't it?! You could check it with the 
>> description given here: 
>> http://qooxdoo.org/documentation/0.7/destructor_support#how_to_test_the_destructor
>> But the check might complain anyway since it would still find the 
>> this.group and this.label members. Try it.
>>
>>     
>>> 3) Sometimes I have seen a long running dispose() in Demo Browser when
>>> you
>>> jump from one page to another under examples. I believe it could be
>>> because
>>> of the time taken for destruct() to complete
>>> on last page. A dumb question. Can I put dispose() asynchronously without
>>> the risk of same object collision?
>>>   
>>>       
>> I'm not sure I'm getting you right here. If you switch between examples 
>> in Demobrowser, you are switching between self-contained pages in the 
>> demo iframe, which means there is a complete unload/load cycle, and I 
>> don't think there is a way around it. And yes, the disposer runs on 
>> unload which consumes time (but also prevents memory pollution in the 
>> browser). But you cannot run the disposer earlier - well, in fact you 
>> can, but then the whole demo application is reduced to a frozen image 
>> where nothing continues to work, since all the objects that do the work 
>> are gone :). And you cannot dispose after the new page has loaded - "in 
>> the background" so to speak - since unfortunately different pages do not 
>> run in different interpreter instances (I wish they would). And two apps 
>> living side by side in the interpreter ... I'm not sure how this could 
>> be handled.
>>
>> HTH,
>> Thomas
>>
>>     
>>> Thanks.
>>> Kanugula.
>>>
>>>   
>>>       
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> qooxdoo-devel mailing list
>> qooxdoo-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>>
>>     
>
>   


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to