mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 17:29:11 +02:00
* fixed memory leak in DrawTest, when running more than one test
git-svn-id: trunk@16004 -
This commit is contained in:
parent
22954b48ad
commit
263fc7b6ff
@ -49,6 +49,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure FreePixArray;
|
||||||
|
var
|
||||||
|
Y: Integer;
|
||||||
|
begin
|
||||||
|
for Y := 0 to YRes - 1 do
|
||||||
|
FreeMem(PixArray[Y], XRes * SizeOf(TPixelColor));
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TestFinalResult;
|
procedure TestFinalResult;
|
||||||
var
|
var
|
||||||
X, Y: Integer;
|
X, Y: Integer;
|
||||||
@ -162,6 +170,8 @@ begin
|
|||||||
|
|
||||||
TestFinalResult;
|
TestFinalResult;
|
||||||
|
|
||||||
|
FreePixArray;
|
||||||
|
|
||||||
CloseGraph;
|
CloseGraph;
|
||||||
Writeln('Ok');
|
Writeln('Ok');
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user