Explorar o código

* fix for memleak (Mantis 16649). Fixed a similar case for sender=nil.

git-svn-id: trunk@15395 -
marco %!s(int64=15) %!d(string=hai) anos
pai
achega
b1ce7d6e07
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      packages/chm/src/chmfilewriter.pas

+ 3 - 1
packages/chm/src/chmfilewriter.pas

@@ -146,7 +146,8 @@ begin
     end;
     TOCStream.Free;
   end;
-
+  if not assigned(sender) then
+    Writer.Free;
 end;
 
 constructor TChmProject.Create;
@@ -305,6 +306,7 @@ begin
 
   if Assigned(TOCStream) then TOCStream.Free;
   if Assigned(IndexStream) then IndexStream.Free;
+  Writer.Free;
 end;