Object pooling is the concept of reusing the created instances instead of destroying and recreating. Object creation and laying out the screen is a slightly time consuming process. To improve the performance of our application, you can pool the created instances, layouts, and so on, and reuse the pooled objects whenever you need them again. This minimizes the amount of browser memory usage by reusing window instances after they have been closed. However, it could equally be used to pool instances of any Object
type (except singletons).
It is the client's responsibility to ensure that the pooled objects are not referenced or used from anywhere else in the application.
In qooxdoo, pooling objects is very simple and can be done with the qx.util.ObjectPool
class. This class provides different methods, which are listed as follows: