LCL: workaround for fpc leak with FClipRegion (missing free in destructor).issue #24980

git-svn-id: trunk@42692 -
This commit is contained in:
zeljko 2013-09-09 06:25:16 +00:00
parent 9e8ac69776
commit 93b81bdd04

View File

@ -1545,6 +1545,8 @@ destructor TCanvas.Destroy;
begin
//DebugLn('[TCanvas.Destroy] ',ClassName,' Self=',DbgS(Self));
Handle := 0;
if FClipRegion <> nil then {issue #24980 looks like TFPCustomCanvas bug}
FreeThenNil(FClipRegion);
FreeThenNil(FRegion);
FreeThenNil(FSavedHandleStates);
if FLock <> 0 then