Disposing resources

Oct 8, 2012 at 10:33 AM


First let me thank you for the resource pool implementation, there is no many of them for C#.

I started using it, in particular DynamicPool and noticed that pooled resources are not disposed when evicted or when the pool is disposed in case they implement IDisposable. That creates a leak of resources and causes trouble for instance when database connections are pooled.

What is your view on this? I implemented resources disposing, let me know if I can send it to you.


Oct 8, 2012 at 12:24 PM

Good day Peter.

You're welcome.

You are absolutely correct in your observations. Not supporting IDisposable was a scope limitation by choice.

I agree with everything you say. I would love to see your implementation and update the project accordingly. If you're interested, I can add you as a contributor to the project. In case my email is not visible, here it goes: mikhail.dutikov at gmail.com

Thank you very much. Please, do keep in touch.


 Best regards,


Oct 8, 2012 at 12:27 PM

To be a contributor would be useful, thanks. Nevertheless, I would appreciate if you could review my code as I am new to C#, coming from C++.

Oct 8, 2012 at 12:52 PM

Peter, I've made you a contributor. You can go ahead and check-in the changes. I will review them during the day.

Or you can send me an email. I will review the code and check it in myself.

Which way to choose is up to you. I'm good with both. I will provide you with review feedback, should you need it.

Oct 8, 2012 at 2:31 PM

Thanks, I will do the commit after I write unit tests.

Oct 9, 2012 at 8:39 PM

Peter, I've reviewed the code. It's OK. I've made a few minor modifications. Sent you an email with details.

Thanks a lot!