Browse Source

* free the implementation info for procdefs immediately after a module
has been compiled

git-svn-id: trunk@32042 -

Jonas Maebe 9 years ago
parent
commit
192bb3e032
2 changed files with 14 additions and 6 deletions
  1. 1 0
      compiler/pmodules.pas
  2. 13 6
      compiler/symdef.pas

+ 1 - 0
compiler/pmodules.pas

@@ -544,6 +544,7 @@ implementation
                     pd.localst.free;
                     pd.localst:=nil;
                   end;
+                pd.freeimplprocdefinfo;
               end;
           end;
       end;

+ 13 - 6
compiler/symdef.pas

@@ -753,6 +753,7 @@ interface
           constructor create(level:byte;doregister:boolean);virtual;
           constructor ppuload(ppufile:tcompilerppufile);
           destructor  destroy;override;
+          procedure   freeimplprocdefinfo;
           { do not override this routine in platform-specific subclasses,
             override ppuwrite_platform instead }
           procedure ppuwrite(ppufile:tcompilerppufile);override;final;
@@ -5329,12 +5330,7 @@ implementation
             dispose(inlininginfo);
             inlininginfo:=nil;
           end;
-         if assigned(implprocdefinfo) then
-           begin
-            stringdispose(implprocdefinfo^.resultname);
-            freemem(implprocdefinfo);
-            implprocdefinfo:=nil;
-           end;
+         freeimplprocdefinfo;
          genericdecltokenbuf.free;
          genericdecltokenbuf:=nil;
          stringdispose(import_dll);
@@ -5358,6 +5354,17 @@ implementation
       end;
 
 
+    procedure tprocdef.freeimplprocdefinfo;
+      begin
+        if assigned(implprocdefinfo) then
+          begin
+            stringdispose(implprocdefinfo^.resultname);
+            freemem(implprocdefinfo);
+            implprocdefinfo:=nil;
+          end;
+      end;
+
+
     procedure tprocdef.ppuwrite(ppufile:tcompilerppufile);
       var
         oldintfcrc : boolean;