Event handle leak in an idle .NET Framework 4 application


Certain Microsoft .NET Framework 4 applications leak event handles even when the application is idle.


Microsoft has confirmed that this is a bug in the .NET Framework 4. The issue occurs because the thread pool is creating and destroying threads, but it will not actually reclaim the memory and handles associated with a thread until the garbage collector runs. For some applications, this happens very rarely, because they seldom allocate managed objects.


This issue has been fixed in the Microsoft .NET Framework 4.5.