[Mono-dev] Mono - CreateProcess error
mono-devel at fluggo.com
Tue Sep 26 14:12:07 EDT 2006
Miguel de Icaza wrote:
> I wonder if you are calling too many processes in quick succession, so
> its just a matter of not enough time to clean up those handles/.
That's not the case. I've had long-running programs that would wait several
minutes between invocations, and they also suffer from this.
As I explain in the bug report, even creating a Process and failing to call
Dispose will not cause a problem by itself. Yes, there may be more Process
handles in the table at once, but the garbage collector is pretty quick at
cleaning them up, and the most I've seen in the table this way is maybe twenty,
a far cry from the table's limit of 4096.
No, the handle leak problem happens regardless of how the C# program chooses to
treat its resources. Disposing of the Process object will clean up most handles
instantly, but regardless of whether you call Dispose, some handles will be
leaked. And if your program runs for a long time, it will eventually hang the
More information about the Mono-devel-list