Object pool pattern: Difference between revisions

Content deleted Content added
Examples: wikified
top: pool
Line 2:
{{citestyle|date=March 2012}}
 
The '''object pool pattern''' is a software [[creational pattern|creational design pattern]] that uses a set of initialized [[Object (computer science)|objects]] kept ready to use, – a "[[Pool (computer science)|pool]]" – rather than allocating and destroying them on demand. A client of the pool will request an object from the pool and perform operations on the returned object. When the client has finished, it returns the object, which is a specific type of [[factory object]], to the pool rather than destroying it.
 
Object pooling can offer a significant performance boost in situations where the cost of initializing a class instance is high, the rate of instantiation of a class is high, and the number of instances in use at any one time is low. The pooled object is obtained in predictable time when creation of the new objects (especially over network) may take variable time.