[fpc-pascal] Constructors & Destructors 101
jonas.maebe at elis.ugent.be
Fri Apr 3 11:05:49 CEST 2009
On 03 Apr 2009, at 03:43, Richard Ward wrote:
> 5) Although I can't remember reading it anywhere, I've noticed from
> my own demo programs that the addresses of objects are initially set
> to nil.
That is not correct. All global variables (classes/objects or not) are
initialized to 0/nil, but local variables aren't (except in case of
reference-counted types). Moreover, the contents of a class instance
are also zeroed when creating it.
More information about the fpc-pascal