mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 13:49:39 +02:00
* fix memory leak in graph, resolves #8467
* small cleanups git-svn-id: trunk@6778 -
This commit is contained in:
parent
9b26e7d261
commit
1ca49ea1e4
@ -47,8 +47,6 @@ const
|
|||||||
StdBufferSize = 4096; { Buffer size for FloodFill }
|
StdBufferSize = 4096; { Buffer size for FloodFill }
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
|
||||||
tinttable = array[0..16383] of smallint;
|
tinttable = array[0..16383] of smallint;
|
||||||
pinttable = ^tinttable;
|
pinttable = ^tinttable;
|
||||||
|
|
||||||
@ -1864,20 +1862,12 @@ end;
|
|||||||
FillPattern:=FillpatternTable[UserFill];
|
FillPattern:=FillpatternTable[UserFill];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
procedure DrawPoly(numpoints : word;var polypoints);
|
procedure DrawPoly(numpoints : word;var polypoints);
|
||||||
|
|
||||||
type
|
type
|
||||||
ppointtype = ^pointtype;
|
ppointtype = ^pointtype;
|
||||||
pt = array[0..16000] of pointtype;
|
pt = array[0..16000] of pointtype;
|
||||||
|
|
||||||
var
|
var
|
||||||
i : longint;
|
i : longint;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if numpoints < 2 then
|
if numpoints < 2 then
|
||||||
begin
|
begin
|
||||||
@ -1984,8 +1974,7 @@ end;
|
|||||||
DriverName:=InternalDriverName; { DOS Graphics driver }
|
DriverName:=InternalDriverName; { DOS Graphics driver }
|
||||||
|
|
||||||
if (Graphdriver=Detect)
|
if (Graphdriver=Detect)
|
||||||
or (GraphMode = detectMode)
|
or (GraphMode = detectMode) then
|
||||||
then
|
|
||||||
begin
|
begin
|
||||||
internDetectGraph(GraphDriver,GraphMode,true);
|
internDetectGraph(GraphDriver,GraphMode,true);
|
||||||
If _GraphResult = grNotDetected then Exit;
|
If _GraphResult = grNotDetected then Exit;
|
||||||
|
@ -132,10 +132,7 @@ end;
|
|||||||
logln('Adding resolution '+strf(modenr)+' for drivernr '+strf(drivernr)+
|
logln('Adding resolution '+strf(modenr)+' for drivernr '+strf(drivernr)+
|
||||||
' ('+strf(mode.maxx)+'x'+strf(mode.maxy)+')');
|
' ('+strf(mode.maxx)+'x'+strf(mode.maxy)+')');
|
||||||
{$endif logging}
|
{$endif logging}
|
||||||
if assigned(list) then
|
newLst^.next := list;
|
||||||
newLst^.next := list^.next
|
|
||||||
else
|
|
||||||
newLst^.next := nil;
|
|
||||||
if assigned(prev) then
|
if assigned(prev) then
|
||||||
prev^.next := newLst
|
prev^.next := newLst
|
||||||
else
|
else
|
||||||
@ -170,7 +167,6 @@ end;
|
|||||||
list^.next := NewLst;
|
list^.next := NewLst;
|
||||||
System.move(mode, NewLst^, sizeof(Mode));
|
System.move(mode, NewLst^, sizeof(Mode));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user