I am thinking of using object pooling for all (or most) objects in my application. In the docs it is described how it is done but I would like to know any tips and best practices for it. For example
1. When I return a window to the pool who is responsible for the cleanup? The class the uses it should return it clean or somehow its cleaned magically during pooling? 2. What about event listeners? For example in this classic demo http://tinyurl.com/3grnpn4 if we want to use pooling for the button, should we somehow remove the event listener before returning it to the pool or it doesn't matter? 3. Let's say we have a win = qx.ui.window.Window() object that contains controls taken from the pool. In the win.destruct() we write code that returns containing widgets to the pool. When we call win.destroy() it will call this destructor and then will dispose the win object. What if we simply return that object to the pool. Is there any way to call the destruct() function? 4. I am thinking of creating a singleton class subclassed from qx.util.ObjectPool and use that as a pool for all my code. Is this a good practice or there are big dissadvantages? ------------------------------------------------------------------------------ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel