Przeglądaj źródła

* fixed memory leaks
* cleaned up some stuff

git-svn-id: trunk@6025 -

florian 18 lat temu
rodzic
commit
2fabc692fa
1 zmienionych plików z 5 dodań i 5 usunięć
  1. 5 5
      compiler/sparc/rgcpu.pas

+ 5 - 5
compiler/sparc/rgcpu.pas

@@ -115,7 +115,8 @@ implementation
 
             helpins:=spilling_create_load(tmpref,tempreg);
             helplist.concat(helpins);
-            list.insertlistafter(pos,helplist)
+            list.insertlistafter(pos,helplist);
+            helplist.free;
           end
         else
           inherited do_spill_read(list,pos,spilltemp,tempreg);
@@ -124,7 +125,6 @@ implementation
 
     procedure trgcpu.do_spill_written(list:TAsmList;pos:tai;const spilltemp:treference;tempreg:tregister);
       var
-        helpins  : tai;
         tmpref   : treference;
         helplist : TAsmList;
         hreg     : tregister;
@@ -149,12 +149,12 @@ implementation
             reference_reset_base(tmpref,hreg,0);
             tmpref.index:=spilltemp.base;
 
-            helpins:=spilling_create_store(tempreg,tmpref);
-            helplist.concat(helpins);
+            helplist.concat(spilling_create_store(tempreg,tmpref));
             if getregtype(tempreg)=R_INTREGISTER then
               ungetregisterinline(helplist,hreg);
 
-            list.insertlistafter(pos,helplist)
+            list.insertlistafter(pos,helplist);
+            helplist.free;
           end
         else
           inherited do_spill_written(list,pos,spilltemp,tempreg);