title: MFC WinApp calls InitInstance and OnAppExit/destructor in different threads
body: <p>I got problem at one of our customers environment - when I AfxGetApp()->WriteProfileString in OnAppExit (or destructor) it doesn't work. I cannot reproduce it anywhere. I tracked it down that the OnAppExit is called from different thread than InitInstance - again, this isn't true at any of my machines. </p>
  
  <p>Can it be the issue? And, why does the OnAppExit gets called in different thread? Thanks.</p>