Ignore:
Timestamp:
Jan 17, 2018, 1:11:56 PM (7 years ago)
Author:
chronos
Message:
  • Added: Check memory leaks in debug build mode.
  • Fixed: Various memory leaks.
Location:
branches/easy compiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/easy compiler

    • Property svn:ignore
      •  

        old new  
        22*.exe
        33*.lps
         4heaptrclog.trc
  • branches/easy compiler/USourceCode.pas

    r143 r145  
    1616
    1717  TSourceReference = class
     18  end;
     19
     20  TSourceReferences = class(TObjectList)
    1821  end;
    1922
     
    7477  end;
    7578
     79  { TSourceConstant }
     80
    7681  TSourceConstant = class
    7782    Name: string;
    7883    Value: TSourceValue;
     84    destructor Destroy; override;
    7985  end;
    8086
     
    123129  TSourceFunctionCall = class(TSourceInstruction)
    124130    Name: string;
    125     Parameters: array of TSourceReference;
    126     procedure AddParameter(Value: TSourceReference);
     131    Parameters: TSourceReferences;
     132    constructor Create;
     133    destructor Destroy; override;
    127134  end;
    128135
     
    156163implementation
    157164
     165{ TSourceConstant }
     166
     167destructor TSourceConstant.Destroy;
     168begin
     169  Value.Free;
     170  inherited Destroy;
     171end;
     172
     173{ TSourceFunctionCall }
     174
     175constructor TSourceFunctionCall.Create;
     176begin
     177  Parameters := TSourceReferences.Create;
     178end;
     179
     180destructor TSourceFunctionCall.Destroy;
     181begin
     182  Parameters.Free;
     183  inherited Destroy;
     184end;
     185
    158186{ TSourceBeginEnd }
    159187
     
    324352
    325353{ TSourceFunctionCall }
    326 
    327 procedure TSourceFunctionCall.AddParameter(Value: TSourceReference);
    328 begin
    329   SetLength(Parameters, Length(Parameters) + 1);
    330   Parameters[Length(Parameters) - 1] := Value;
    331 end;
    332354
    333355{ TSourceCode }
Note: See TracChangeset for help on using the changeset viewer.