An object pool is a container having objects ready to be used. It is a software constructs that designed to optimize the use of limited resources in order to meet the demands of client requests by "pooling" objects in a container and reusing these pooled objects as needed.
When an object is activated, it is pulled from the pool. When the object is deactivated, it is placed back into the pool to await the next request. You can configure object pooling by applying the ObjectPoolingAttribute attribute to a class that derives from the System.EnterpriseServices.ServicedComponent class. The Diagnostics class provides informational properties for that can help you understand how the pool is behaving under different scenarios and load. Whenever a part of an application performance is bound to its resources, specifically creating and destroying them, Object pool can offer a significant performance boost . The MTS Glossary defines Pooling as "A performance optimization based on using collections of pre-allocated resources, such as objects or database connections."
- What are the Default Access Modifiers in C#?
- What is a sealed class in C#?
- What is operator overloading in c#?
- Difference Between Finalize and Dispose Method in C#?
- What is Anonymous type in C#?
- Dynamic type variables Vs Object type variables in C#?
- What is the difference between Array and ArrayList in C#?
- Difference Between Clone() and CopyTo() Array
- Difference between throw and throw new Exception() in C# ?
- What is the use of finally block in C#?