procedure Adopt(const aArray: TIntegerArray; const aIndex: Integer; const ARows: Integer; const ACols: Integer);
Adopts a pointer to one dimensional array.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | aArray | TIntegerArray | |
| 2 | aIndex | Integer | |
| 3 | ARows | Integer | |
| 4 | ACols | Integer |
Result: stored in self (calling object)
Remarks:
Adopts a pointer to AArray array. The method sets the calling matrix TMtxVecInt.IntPrecision property to prInt32, TMtxInt.Rows to ARows, TMtxInt.Cols to ACols and Values1D and CValues1D to Pointer(AArray).
Note
You must call the TMtxInt.Disown method, before you destroy the matrix. Use this method to save a copy operation. You should be very careful never to resize the calling matrix while it contains the adopted memory or call any routines that would require the matrix to reallocate the memory.
See Also: TMtxInt.Disown