Class TgoArray
Unit
Grijjy.Collections
Declaration
type TgoArray<T> = class(TObject)
Description
Various utilities that operate on generic dynamic arrays. Mostly used internally by various generic collections.
Hierarchy
Overview
Methods
|
class procedure Move(var AArray: TArray<T>; const AFromIndex, AToIndex, ACount: Integer); overload; static; |
|
class procedure Move(const AFromArray: TArray<T>; const AFromIndex: Integer; var AToArray: TArray<T>; const AToIndex, ACount: Integer); overload; static; |
|
class procedure Finalize(var AArray: TArray<T>; const AIndex: Integer); overload; static; inline; |
|
class procedure Finalize(var AArray: TArray<T>; const AIndex, ACount: Integer); overload; static; inline; |
Description
Methods
|
class procedure Move(var AArray: TArray<T>; const AFromIndex, AToIndex, ACount: Integer); overload; static; |
Moves items within an array.
You should use this utility instead of System.Move since it correctly handles elements with [weak] references.
Note: no range checking is performed on the arguments.
Parameters
- AArray
- the array
- AFromIndex
- the source index into AArray
- AToIndex
- the destination index into AArray
- ACount
- the number of elements to move.
|
|
class procedure Move(const AFromArray: TArray<T>; const AFromIndex: Integer; var AToArray: TArray<T>; const AToIndex, ACount: Integer); overload; static; |
Moves items from one array to another.
You should use this utility instead of System.Move since it correctly handles elements with [weak] references.
Note: no range checking is performed on the arguments.
Parameters
- AFromArray
- the source array
- AFromIndex
- the source index into AFromArray
- AToArray
- the destination array
- AToIndex
- the destination index into AToArray
- ACount
- the number of elements to
move .
|
|
class procedure Finalize(var AArray: TArray<T>; const AIndex: Integer); overload; static; inline; |
Finalizes an element in an array.
You should call this utility to mark an element in an array as "unused". This prevents memory problems when the array contains elements that are reference counted or contain [weak] references. In those cases, the element will be set to all zero's. If the array contains "regular" elements, then this method does nothing.
Note: no range checking is performed on the arguments.
Parameters
- AArray
- the array containing the element to finalize.
- AIndex
- the index of the element to finalize.
|
|
class procedure Finalize(var AArray: TArray<T>; const AIndex, ACount: Integer); overload; static; inline; |
Finalizes a range ofelements in an array.
You should call this utility to mark an element in an array as "unused". This prevents memory problems when the array contains elements that are reference counted or contain [weak] references. In those cases, the element will be set to all zero's. If the array contains "regular" elements, then this method does nothing.
Note: no range checking is performed on the arguments.
Parameters
- AArray
- the array containing the elements to
finalize .
- AIndex
- the index of the first element to
finalize .
- ACount
- the number of elements to
finalize .
|
Generated by P2PasDoc 0.13.0 on 2017-04-25 12:54:26
|