浏览代码

Dispose of removed task in ttask_handler.processqueue

Pierre Muller 1 月之前
父节点
当前提交
197818631a
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      compiler/ctask.pas

+ 1 - 0
compiler/ctask.pas

@@ -350,6 +350,7 @@ begin
         {$IFDEF DEBUG_CTASK}Writeln(t.module.ToString,' is finished, removing from task list');{$ENDIF}
         {$IFDEF DEBUG_CTASK}Writeln(t.module.ToString,' is finished, removing from task list');{$ENDIF}
         hash.Remove(t.module);
         hash.Remove(t.module);
         list.Remove(t);
         list.Remove(t);
+        FreeAndNil(t);
         end;
         end;
 
 
       // first search for any module that is ready to be written as ppu
       // first search for any module that is ready to be written as ppu