Ver código fonte

* fix heap leaks

carl 23 anos atrás
pai
commit
d170f6625f
2 arquivos alterados com 13 adições e 4 exclusões
  1. 7 3
      compiler/ncgutil.pas
  2. 6 1
      compiler/pdecvar.pas

+ 7 - 3
compiler/ncgutil.pas

@@ -1209,7 +1209,8 @@ implementation
         paraloc : tparalocation;
 
       begin
-        stackalloclist:=taasmoutput.Create;
+        if not inlined then
+           stackalloclist:=taasmoutput.Create;
 
         { the actual stack allocation code, symbol entry point and
           gdb stabs information is generated AFTER the rest of this
@@ -1483,7 +1484,7 @@ implementation
                 cg.g_stackcheck(stackalloclist,stackframe);
             end;
             list.insertlist(stackalloclist);
-{            stackalloclist.free;}
+            stackalloclist.free;
          end;
         {************************* End Stack allocation **************************}
       end;
@@ -1853,7 +1854,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.52  2002-09-30 07:00:46  florian
+  Revision 1.53  2002-10-05 15:18:42  carl
+    * fix heap leaks
+
+  Revision 1.52  2002/09/30 07:00:46  florian
     * fixes to common code to get the alpha compiler compiled applied
 
   Revision 1.51  2002/09/22 14:02:35  carl

+ 6 - 1
compiler/pdecvar.pas

@@ -569,12 +569,17 @@ implementation
            end;
          block_type:=old_block_type;
          current_object_option:=old_current_object_option;
+         { free the list }
+         sc.free;
       end;
 
 end.
 {
   $Log$
-  Revision 1.36  2002-10-05 12:43:26  carl
+  Revision 1.37  2002-10-05 15:18:43  carl
+    * fix heap leaks
+
+  Revision 1.36  2002/10/05 12:43:26  carl
     * fixes for Delphi 6 compilation
      (warning : Some features do not work under Delphi)