message: UI-CPP: Fixed memory bug due to destruction order.
  The singleton Log was destroyed before the shared_ptr was deleted, so that the State_Delete function tried to use a broken Log.
diff: @@ -120,6 +120,7 @@ int main(int argc, char ** argv)
  // If Application is closed normally
  if (exec != 0) throw exec;
  // Finish
  + state.reset();
  return exec;
  //-------------------------------------------------------------------------------
  #else
  @@ -128,6 +129,6 @@ int main(int argc, char ** argv)
  //-------------------------------------------------------------------------------
  #endif
  -
  + state.reset();
  return 0;
  }
  