Browse Source

* Patch from Andrey Sobol to fix memleak

git-svn-id: trunk@47799 -
michael 4 years ago
parent
commit
034048e09d
1 changed files with 8 additions and 0 deletions
  1. 8 0
      packages/chm/src/itsftransform.pas

+ 8 - 0
packages/chm/src/itsftransform.pas

@@ -435,7 +435,15 @@ initialization
 
 finalization
   if Assigned(LocTransforms) then
+  begin
+    while LocTransforms.Count > 0 do
+    begin
+      if Assigned(PITSFTranformItem(LocTransforms.Items[0])^.Instance) then
+          (PITSFTranformItem(LocTransforms.Items[0])^.Instance).Free;
+      LocTransforms.Delete(0);
+    end;
     LocTransforms.Free;
+  end
 
 end.