* fix memory leak of video unit as proposed by Michael Karst, resolves #22876

git-svn-id: trunk@22927 -
This commit is contained in:
florian 2012-11-04 18:42:47 +00:00
parent a523d81b87
commit b58273fdeb
3 changed files with 16 additions and 0 deletions

1
.gitattributes vendored
View File

@ -12954,6 +12954,7 @@ tests/webtbs/tw2280.pp svneol=native#text/plain
tests/webtbs/tw22860.pp svneol=native#text/plain
tests/webtbs/tw22864.pp svneol=native#text/pascal
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/tw2289.pp svneol=native#text/plain
tests/webtbs/tw2291.pp svneol=native#text/plain

View File

@ -746,4 +746,13 @@ end;
initialization
SetVideoDriver(SysVideoDriver);
TargetEntry;
finalization
if (OrigScreenSize <> 0) and (OrigScreen <> nil) then
begin
FreeMem (OrigScreen, OrigScreenSize);
OrigScreen := nil;
OrigScreenSize := 0;
end;
end.

6
tests/webtbs/tw22876.pp Normal file
View File

@ -0,0 +1,6 @@
{ %OPT=-gh }
program test;
uses video;
begin
end.