Browse Source

* Fix memleak when using packages

git-svn-id: trunk@48082 -
michael 4 years ago
parent
commit
7adcd2a8a2
1 changed files with 3 additions and 0 deletions
  1. 3 0
      packages/fcl-passrc/src/pparser.pp

+ 3 - 0
packages/fcl-passrc/src/pparser.pp

@@ -3142,7 +3142,10 @@ begin
       FinishedModule;
       FinishedModule;
   finally
   finally
     if HasFinished then
     if HasFinished then
+      begin
+      Module.Release{$IFDEF CheckPasTreeRefCount}('TPasPackage.Modules'){$ENDIF};
       FCurModule:=nil; // clear module if there is an error or finished parsing
       FCurModule:=nil; // clear module if there is an error or finished parsing
+      end;
   end;
   end;
 end;
 end;