//--------------------------------------------------------------------------- void __fastcall FreeLogForm() { if (LogForm) { TLogForm * PLogForm = LogForm; LogForm = NULL; // would also free form see TLogForm::FormClose() // we can't free form directly (cause exception when form is closed by // button on toolbar, beacuse it destroys the button too) PLogForm->Close(); } }
//--------------------------------------------------------------------------- TLogForm * __fastcall CreateLogForm(TLogMemo *ALogMemo) { assert(!LogForm); TLogForm * aLogForm = new TLogForm(Application); try { aLogForm->LogMemo = ALogMemo; aLogForm->Show(); } catch (...) { delete aLogForm; throw; } LogForm = aLogForm; return aLogForm; }
//--------------------------------------------------------------------------- TLogForm * __fastcall CreateLogForm(TLogMemo *ALogMemo) { DebugAssert(!LogForm); Configuration->Usage->Inc(L"LogWindowDisplays"); TLogForm * aLogForm = new TLogForm(Application); try { aLogForm->LogMemo = ALogMemo; aLogForm->Show(); } catch (...) { delete aLogForm; throw; } LogForm = aLogForm; return aLogForm; }