zluo
06-02-2012, 04:28 AM
{$i SRL/SRL.simba}
procedure loadthosedtms;
begin
dtm1 := dtmfromstring(........);
dtm2 := dtmfromstring(........);
end;
procedure freeing;
begin
freedtm(dtm1);
freedtm(dtm2);
end;
procedure This;
begin
something
end;
procedure Main;
begin
loadthosedtms;
repeat
This;
until(false);
end;
begin
SetUpSrl;
Addonterminate(freeing);
ClearDebug;
ActivateClient;
Repeat
Main;
Until(false);
end.
is this correct use of addonterminate? would this run "freeing" even if i terminated it manually and would it also run it if i terminate the script via terminatescript;?
procedure loadthosedtms;
begin
dtm1 := dtmfromstring(........);
dtm2 := dtmfromstring(........);
end;
procedure freeing;
begin
freedtm(dtm1);
freedtm(dtm2);
end;
procedure This;
begin
something
end;
procedure Main;
begin
loadthosedtms;
repeat
This;
until(false);
end;
begin
SetUpSrl;
Addonterminate(freeing);
ClearDebug;
ActivateClient;
Repeat
Main;
Until(false);
end.
is this correct use of addonterminate? would this run "freeing" even if i terminated it manually and would it also run it if i terminate the script via terminatescript;?