title: Do IDisposable objects get disposed of if the program is shut down unexpectedly?
body: <p>What happens if the program exits unexpectedly (either by exception or the process is terminated)? Are there any situations like this (or otherwise) where the program will terminate, but <code>IDisposable</code> objects won't be properly disposed of?</p>
  
  <p>The reason I'm asking is because I'm writing code that will communicate with a peripheral, and I want to make sure there's no chance it will be left in a bad state.</p>