__fastcall TOwnConsole::~TOwnConsole()
{
  TGuard Guard(FSection.get());

  delete FTrayIcon;
  delete FWindowStateTimer;

  // deliberately do not remove ConsoleCtrlHandler as it causes
  // failures while exiting

  FreeConsole();

  DebugAssert(FInstance == this);
  FInstance = NULL;
}

__fastcall TOwnConsole::~TOwnConsole()
{
  TGuard Guard(FSection.get());

  delete FTrayIcon;
  delete FWindowStateTimer;

   
   

  FreeConsole();

  DebugAssert(FInstance == this);
  FInstance = NULL;
}
