mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 20:29:17 +02:00
* fix memory leak of video unit as proposed by Michael Karst, resolves #22876
git-svn-id: trunk@22927 -
This commit is contained in:
parent
a523d81b87
commit
b58273fdeb
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -12954,6 +12954,7 @@ tests/webtbs/tw2280.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw22860.pp svneol=native#text/plain
|
tests/webtbs/tw22860.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw22864.pp svneol=native#text/pascal
|
tests/webtbs/tw22864.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw22869.pp svneol=native#text/plain
|
tests/webtbs/tw22869.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw22876.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw22878.pp svneol=native#text/plain
|
tests/webtbs/tw22878.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2289.pp svneol=native#text/plain
|
tests/webtbs/tw2289.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2291.pp svneol=native#text/plain
|
tests/webtbs/tw2291.pp svneol=native#text/plain
|
||||||
|
@ -746,4 +746,13 @@ end;
|
|||||||
initialization
|
initialization
|
||||||
SetVideoDriver(SysVideoDriver);
|
SetVideoDriver(SysVideoDriver);
|
||||||
TargetEntry;
|
TargetEntry;
|
||||||
|
|
||||||
|
finalization
|
||||||
|
if (OrigScreenSize <> 0) and (OrigScreen <> nil) then
|
||||||
|
begin
|
||||||
|
FreeMem (OrigScreen, OrigScreenSize);
|
||||||
|
OrigScreen := nil;
|
||||||
|
OrigScreenSize := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
6
tests/webtbs/tw22876.pp
Normal file
6
tests/webtbs/tw22876.pp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{ %OPT=-gh }
|
||||||
|
program test;
|
||||||
|
uses video;
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user