Process class,

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.
 
A

Arne Vajhøj

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
 
P

Phil Wilson

This what Reflector is for ;=)

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top