Process class,

  • Thread starter Thread starter cronusf
  • Start date Start date
C

cronusf

I am using the Process class to launch a process. But other than
that, I do not need a reference to a Process object. So my question
is, after I call Process.Start, can I call Dispose on the Process
reference and be done with it? I don't want it to shutdown the
process I launched.
 
I am using the Process class to launch a process. But other than
that, I do not need a reference to a Process object. So my question
is, after I call Process.Start, can I call Dispose on the Process
reference and be done with it? I don't want it to shutdown the
process I launched.

Dispose is supposed to release unmanaged resources. An OS process
is an unmanaged resource. I would expect Dispose to kill the
process. But the documentation does not confirm. Maybe you should
make a little experiment.

Arne
 
This what Reflector is for ;=)

Looks like it just releases the handles and stops waiting for the process to
exit.
 
Back
Top