Jean-Baptiste BRIAUD - Novlog schrieb:
> Hi,
>
> I'm using Composite layed out by Dock.
>
> There is a component in the north (its a menu but its not important).
>
> what happen when I add another component instance in the north as a  
> way to replace the old one ?
>
>   
If you add a second widget to the "north" edge it will be placed just 
below the other "north" widget. You can add any number of widgets to 
each edge.
> Will it remove the one I added before properly or do I have to do it  
> myself ?
>   
Nothing will be removed. If you still have a reference to the old 
"north" widget you can simply call container.remove(oldNorth). Nothing 
will be disposed by this call.
> Then, whatever the answer is for that first part, when I removed the  
> first one (either by hand or automatically) do I have to dispose it  
> manually or is it garbaged like in Java/Swing if there is no more  
> reference to it ?
>
> That north part will be constantly replaced, I mean host a lot of  
> different component but only one at a time, during the runtime of my  
> application, so it is very important that I prevent memory leak here.
>   
If possible try to cache the north widgets and reuse them, when they are 
used again. Constantly creating and disposing widgets can slow down your 
application significantly. If you have to recreate the north widget each 
time you have to manually dispose the old one using oldNorth.destroy();

Best Fabian

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to