[fpc-pascal] Re: two questions about dynamic array
Howard Page-Clark
hdpc at talktalk.net
Thu Mar 14 15:45:50 CET 2013
On 14/03/13 7:59, Mattias Gaertner wrote:
> Xiangrong wanted to know if the above array is initialized.
> If you want to test that then you have to either single step via
> the debugger or to compare the allocated memory before and after.
> The problem is that you do not know the memory position before the
> allocation.
> You can try to create the class, change it, free it and
> allocate it again. If the two instances are at the same position, then
> you can check for 0 or nil.
Thanks for the clear explanation. I now see that the question is about
the data stored in memory, not about the memory address.
Howard
More information about the fpc-pascal
mailing list