<p>I'm developing class to represent special kind of matrix:</p>

<pre><code>type
  DifRecord = record
    Field: String;
    Number: Byte;
    Value: smallint;
  end;

type
  TData = array of array of MainModule.DataRecord;

type
  TDifference = array of DifRecord;

type
  TFogelMatrix = class
  private
    M: Byte;
    N: Byte;
    Data: ^TData;
    DifVector: ^TDifference;
    procedure init(); 
  public
    constructor Create(Rows, Cols: Byte);
    destructor Destroy;
  end;
</code></pre>

<p>Now in constructor I need to reserve memory for Data and DifVector class members. I use pointers to array of records, as you see. So, the main question is, how can I correctly reserve memory? I suppose I can not use something like that:<br>
<code>new(Data);<br>
new(DifVector);<br></code>
cause I`m loosing the main idea - to reserve memory space, as much as I want to, at run-time. Thanks for comments.</p>

Since you're using dynamic arrays,
```
array of
```
, then you should use SetLength to specify the length of the array, which can be done dynamically.
ie. like this:
```
```
SetLength(Data, 100);
```
```
This will not reserve 100 bytes, but will reserve enough space to hold 100 elements of whatever type the array holds.
Change your declarations for the arrays to simple arrays:
```
```
Data: TData;
DifVector: TDifference;
```
```
and use it with SetLength, it should do the trick.