Monday, November 28, 2011

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.

No comments:

Post a Comment