What is an object pool in .NET? An object pool is a container of objects that holds a list of other objects that are ready to be used.
It keeps track of:
- Objects that are currently in use - The number of objects the pool holds - Whether this number should be increased
The request for the creation of an object is served by allocating an object from the pool.
This reduces the overhead of creating and re-creating objects each time an object creation is required.
It is a list of ready to use objects. Whenever a new request comes in for creating an object, then the application is served from this pool. This reduces the overhead of creating an object over and over again.
|