Dispose when closed by pressing X
15849
Capture console exit C#
56511
How to close the (local) Debug window/palette
34197
Should I Dispose() DataSet and DataTable?
142394
How do I prevent a form object from disposing on close?
112417
How to delete a directory automatically when an executable is killed
5575
How can I run a command which will survive terminal close?
148278
Is there any way to execute something when closing the laptop's lid?
20990
Dispose or Recycle Hard Drive
90535
Not checking close()'s return value: how serious, really?
24048
What happens when you close a c++ console application
72784
Automatically close Mathematica
134689
Setting an object to null vs Dispose()
31098
How do I close a terminal without saving the history?
89207
Closing inputstreams in Java
22803
Closing Streams in Java
136625
Closing a window
66921
Dispose in Client Object Model