fpc/tests/webtbs/tw4247.pp
Jonas Maebe 31550b0153 * set HaltOnNotReleased to true in all testss using heaptrc so
they'll exit with an error code in case of a memory leak

git-svn-id: trunk@8350 -
2007-09-01 20:36:04 +00:00

21 lines
437 B
ObjectPascal

{ %OPT=-gh }
{ Source provided for Free Pascal Bug Report 4247 }
{ Submitted by "Martin Schreiber" on 2005-08-02 }
{ e-mail: }
program project1;
//compile with -ghl
var
po1,po2: pointer;
begin
HaltOnNotReleased := true;
getmem(po1,500);
getmem(po2,500);
reallocmem(po1,400);
reallocmem(po1,300);
reallocmem(po1,200);
reallocmem(po1,400); //crash with error 204
reallocmem(po1,600);
freemem(po1,600);
freemem(po2,500);
end.