2
Reply

What is the difference between an object pool and connection pool in .NET?

Sahil Bansal

Sahil Bansal

12y
2.8k
0
Reply

    In case of object pooling, you can control the number of connections. In this case the pool will decide whether the maximum is reached or not for creation of objects. If it reached to the maximum level then the next available object will returned back. The drawback is, it increases the time complexity for heavy objects. In case of connection pooling, you can control the maximum number of connections reached. When you are using this pool, since there is nothing in the pool, still it will create connection on the same thread.

    In case of object pooling, you can control the number of connections. In this case the pool will decide whether the maximum is reached or not for creation of objects. If it reached to the maximum level then the next available object will returned back. The drawback is, it increases the time complexity for heavy objects. In case of connection pooling, you can control the maximum number of connections reached. When you are using this pool, since there is nothing in the pool, still it will create connection on the same thread.