Smart Thread Pool slow memory leak


This is an issue I have been experiencing for some time. I have noticed it also mentioned on CodeProject as well. I’m not entirely sure what’s causing it. I have tried to pare it down in a smaller project to give you something to work from.

Using this project I noticed in a roughly 12 hour period the process memory usage go from about 32 MB of ram to about 1GB.

It is entirely possible that there is an issue with my implementation and maybe I’m missing something….however on the off chance I’m not hopefully this will help.

Note: the project included is a simple console app that runs bogus worker threads infinitely. Also, my development environment is Windows XP (32bit) and VS 2008 SP1.


file attachments

Closed Aug 22, 2012 at 5:30 AM by
Closed for now because there is no reconstruction scenario.


dabeir wrote Aug 8, 2009 at 1:53 PM

After researching this issue further it appears my example project is flawed and creating the appearance of a memory leak. I cannot reproduce the memory leak at this time. Thanks.

amibar wrote Aug 18, 2009 at 9:21 AM

Thanks for the effort.

I have several comments about memory leaks, but I don't have any snippet that generates it.
If you succeed in the future, please notify me.