Changeset 46 for trunk/Compiler


Ignore:
Timestamp:
Mar 4, 2012, 10:35:47 AM (13 years ago)
Author:
chronos
Message:
  • Fixed: Memory leaks in TCompiler and TTarget.
Location:
trunk/Compiler
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Compiler/Target/Interpretter/UTargetInterpretter.pas

    r41 r46  
    66
    77uses
    8   Classes, SysUtils, UTarget;
     8  Classes, SysUtils, UTarget, UExecutor;
    99
    1010type
     
    1414  TTargetInterpretter = class(TTarget)
    1515    constructor Create; override;
     16  end;
     17
     18  TExecutorInterpretter = class(TExecutor)
     19
    1620  end;
    1721
     
    2529  SysName := 'Interpretter';
    2630  Name := 'Interpretter';
     31  Executor := TExecutorInterpretter.Create;
    2732end;
    2833
  • trunk/Compiler/UCompiler.pas

    r44 r46  
    8282destructor TCompiler.Destroy;
    8383begin
     84  Analyzer.Free;
    8485  AbstractCode.Free;
    8586  Targets.Free;
  • trunk/Compiler/UTarget.pas

    r41 r46  
    1919    Executor: TExecutor;
    2020    constructor Create; virtual;
     21    destructor Destroy; override;
    2122  end;
    2223
     
    3738end;
    3839
     40destructor TTarget.Destroy;
     41begin
     42  Producer.Free;
     43  Executor.Free;
     44  inherited Destroy;
     45end;
     46
    3947{ TListTarget }
    4048
Note: See TracChangeset for help on using the changeset viewer.