Using C# 4.0, I've created a System.Diagnostics.Process
that I expect to take a short amount of time to run. If for some reason the process hasn't exited after some amount of time (e.g, I've called .WaitForExit(timeout)
and the return value was false
), I need to cleanup. I've decided that it's safe to use .Kill()
in this particular situation (there are no data structures I'm worried about corrupting).
Given this setup, do I also need to call the .Close()
method of the Process? If so, should I call .Close()
before or after .Kill()
?