mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 17:29:21 +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;
|
||||
|
||||
procedure FreePixArray;
|
||||
var
|
||||
Y: Integer;
|
||||
begin
|
||||
for Y := 0 to YRes - 1 do
|
||||
FreeMem(PixArray[Y], XRes * SizeOf(TPixelColor));
|
||||
end;
|
||||
|
||||
procedure TestFinalResult;
|
||||
var
|
||||
X, Y: Integer;
|
||||
@ -162,6 +170,8 @@ begin
|
||||
|
||||
TestFinalResult;
|
||||
|
||||
FreePixArray;
|
||||
|
||||
CloseGraph;
|
||||
Writeln('Ok');
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user