Selaa lähdekoodia

* fixed small mem leaks

peter 22 vuotta sitten
vanhempi
commit
750c3b315e
2 muutettua tiedostoa jossa 16 lisäystä ja 5 poistoa
  1. 5 1
      compiler/fppu.pas
  2. 11 4
      compiler/pexpr.pas

+ 5 - 1
compiler/fppu.pas

@@ -104,6 +104,7 @@ uses
         if assigned(ppufile) then
         if assigned(ppufile) then
          ppufile.free;
          ppufile.free;
         ppufile:=nil;
         ppufile:=nil;
+        stringdispose(sourcefn);
         inherited Destroy;
         inherited Destroy;
       end;
       end;
 
 
@@ -1331,7 +1332,10 @@ uses
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.29  2002-12-29 14:57:50  peter
+  Revision 1.30  2003-03-27 17:44:13  peter
+    * fixed small mem leaks
+
+  Revision 1.29  2002/12/29 14:57:50  peter
     * unit loading changed to first register units and load them
     * unit loading changed to first register units and load them
       afterwards. This is needed to support uses xxx in yyy correctly
       afterwards. This is needed to support uses xxx in yyy correctly
     * unit dependency check fixed
     * unit dependency check fixed

+ 11 - 4
compiler/pexpr.pas

@@ -734,9 +734,13 @@ implementation
               { generate a methodcallnode or proccallnode }
               { generate a methodcallnode or proccallnode }
               { we shouldn't convert things like @tcollection.load }
               { we shouldn't convert things like @tcollection.load }
               p2:=cloadnode.create_procvar(sym,aprocdef,st);
               p2:=cloadnode.create_procvar(sym,aprocdef,st);
-              if assigned(p1) and
-                 (p1.nodetype<>typen) then
-                tloadnode(p2).set_mp(p1);
+              if assigned(p1) then
+               begin
+                 if (p1.nodetype<>typen) then
+                   tloadnode(p2).set_mp(p1)
+                 else
+                   p1.free;
+               end;
               p1:=p2;
               p1:=p2;
 
 
               { no postfix operators }
               { no postfix operators }
@@ -2340,7 +2344,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.104  2003-03-17 18:55:30  peter
+  Revision 1.105  2003-03-27 17:44:13  peter
+    * fixed small mem leaks
+
+  Revision 1.104  2003/03/17 18:55:30  peter
     * allow more tokens instead of only semicolon after inherited
     * allow more tokens instead of only semicolon after inherited
 
 
   Revision 1.103  2003/03/17 16:54:41  peter
   Revision 1.103  2003/03/17 16:54:41  peter