2

I have a process p in my application, which will be closed by the user at some point while my application is still running. But I want my application to run on while p is running. How do I then dispose p after p were closed by the user?

1 Answers1

2

Use p.Exited += (emitter, args) => ((Process) emitter).Dispose(); before starting p

Tobias Brohl
  • 479
  • 6
  • 25