Ignore:
Timestamp:
Mar 22, 2018, 8:31:19 PM (6 years ago)
Author:
chronos
Message:
  • Modified: Update Common and CollTranslator packages to fix build under Lazarus 1.8.
  • Fixed: Some memory leaks.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/UMemory.pas

    r10 r15  
    2424    constructor Create;
    2525    destructor Destroy; override;
     26    procedure WriteMemory(Position: Integer; Memory: TMemory);
     27    procedure ReadMemory(Position: Integer; Memory: TMemory);
    2628    property Data: PByte read FData;
    2729    property Size: Integer read FSize write SetSize;
     
    108110end;
    109111
     112procedure TMemory.WriteMemory(Position: Integer; Memory: TMemory);
     113begin
     114  Move(Memory.FData, PByte(@FData + Position)^, Memory.Size);
     115end;
     116
     117procedure TMemory.ReadMemory(Position: Integer; Memory: TMemory);
     118begin
     119  Move(PByte(@FData + Position)^, Memory.FData, Memory.Size);
     120end;
     121
    110122end.
    111123
Note: See TracChangeset for help on using the changeset viewer.