I have an autocreated form, and in the ::FormCreate event or the form's constructor I'm reading some registry values. If some values are missing, I try to quit the application. I'm doing this by calling this->Close();
This calls the FormClose event (where I free all allocated memory). However, the program does not quit. I tried to put all the code in the constructor instead of in the FormCreate event, but it's the same.
When I close the program manually, the onClose event is called again, freeing memory that's already freed. Question is why doesn't the application quit
__fastcall TfmMain::TfmMain(TComponent* Owner)
this->Close(); //or Application->Terminate(); same effect
void __fastcall TfmMain::FormClose(TObject *Sender, TCloseAction &Action)
delete  someMemory;