при журнале (что происходит в результате действия пользователя или после простоя), я хочу очистить память < /p>
- для безопасности < /li>
. версия, если она существует
Вопрос: как я могу
- /> < /ul>
Я попробовал несколько вариантов, но я продолжаю получать исключение в конструкторе основной формы. Это указывает на то, что память из предыдущего сеанса не была очищена.procedure Tfrm_Ops_Main.Log_Out (AAuto : Boolean = False);
begin
TConsole.Log (msg_Logging_Out);
if AAuto
then Stop_Warning_User_At_Tab_Close;
Free_Child_Form;
Close;
{ Allowing for Form to Close }
// THtml.Replace_Page;
THtml.Reload_After_Delay (400);
end;
I have tried the three methods
Replace_Page - Reload_Page
- Reload_Page_After_Delay
class procedure THtml.Replace_Page (AUrl : string = '');
var
lUrl : string;
lTime : Int64;
begin
{ Add time in ms if same URL }
if AUrl = ''
then begin
LTime := Trunc ((Now - UnixEpoch) * ToMS);
LUrl := window.location.href + '?t=' + IntToStr (LTime);
end
else LUrl := AUrl;
document.location.replace (LUrl);
end;
class procedure THtml.Reload_Page;
begin
document.location.reload (True);
end;
class procedure THtml.Reload_After_Delay (ADelayMS : Integer);
var
LTimer : TWebTimer;
begin
LTimer := TWebTimer.Create(nil);
LTimer.Interval := ADelayMS;
LTimer.Enabled := True;
LTimer.OnTimer := Do_Reload;
end;
class procedure THtml.Do_Reload (Sender : Tobject);
begin
TWebTimer (Sender).Free;
THtml.Reload_Page;
end;
< /code>
Фрагмент исключения - < /p>
Error: Duplicate component name: "divHeading"
at Object.Create$1 (https://example.com.au/ops-test/ops_1_0_2109.js:3634:23)
at Object.CreateFmt (https://example.com.au/ops-test/ops_1_0_2109.js:3641:12)
at c.$create (https://example.com.au/ops-test/ops_1_0_2109.js:366:19)
at Object.ValidateRename (https://example.com.au/ops-test/ops_1_0 ... :15533:188)
at Object.SetName (https://example.com.au/ops-test/ops_1_0 ... s:15513:21)
at Object.SetName (https://example.com.au/ops-test/ops_1_0 ... s:33680:38)
at Object.LoadDFMValues (https://example.com.au/ops-test/ops_1_0 ... :127837:25)
at Object.CreateNewForm (https://example.com.au/ops-test/ops_1_0 ... s:43375:13)
at Object.DoFormLoad (https://example.com.au/ops-test/ops_1_0 ... s:43010:12)
at XMLHttpRequest.cb (https://example.com.au/ops-test/ops_1_0_2109.js:282:28)
Подробнее здесь: https://stackoverflow.com/questions/797 ... completion
Мобильная версия