M
Mark Gillespie
I have a class that launches a process (amongst other things). I keep
track of the process handle, and just prior to the obejct being destroyed
by the garbage collector, I want to kill that process. Basically, if some
exits my application, I don't want any stray background applications
running created by instances of my class.
I tried calling the kill() method on the process handle in the class's
destructor, but the handle must have been destroyed already, as it's not a
valid handle any more (even thou the now orphaned process is still
running).
How can I achieve what I want to do? Is there a way of trapping a even
just prior ro garbage colection?
As you may have guessed, I am quite new to this C# stuff..
Thanks for any suggestions...
track of the process handle, and just prior to the obejct being destroyed
by the garbage collector, I want to kill that process. Basically, if some
exits my application, I don't want any stray background applications
running created by instances of my class.
I tried calling the kill() method on the process handle in the class's
destructor, but the handle must have been destroyed already, as it's not a
valid handle any more (even thou the now orphaned process is still
running).
How can I achieve what I want to do? Is there a way of trapping a even
just prior ro garbage colection?
As you may have guessed, I am quite new to this C# stuff..

Thanks for any suggestions...