GetMem creates a dynamic variable and a pointer to the address of the block.
Example:
GetMem(ap, nps*sizeof(TPoint));