+ HaltOnNotReleased boolean added:defaults to false.

if set to true, and all memory is not freed,
   a RTE 203 is generated.
   Can only be set via HEAPTRC environment variable.

git-svn-id: trunk@5806 -
This commit is contained in:
pierre 2007-01-04 10:48:22 +00:00
parent 6ad288cd32
commit 1eefed6cfe

View File

@ -55,6 +55,9 @@ const
quicktrace : boolean=true;
{ calls halt() on error by default !! }
HaltOnError : boolean = true;
{ Halt on exit if any memory was not freed }
HaltOnNotReleased : boolean = false;
{ set this to true if you suspect that memory
is freed several times }
{$ifdef EXTRA}
@ -1002,6 +1005,8 @@ begin
;
pp:=pp^.previous;
end;
if HaltOnNotReleased and (getmem_cnt<>freemem_cnt) then
exitcode:=203;
end;
@ -1228,6 +1233,8 @@ begin
useheaptrace:=false;
if pos('nohalt',s)>0 then
haltonerror:=false;
if pos('haltonnotreleased',s)>0 then
HaltOnNotReleased :=true;
i:=pos('log=',s);
if i>0 then
begin