2011/4/27 Alexander Klenin <[email protected]>: > No, the destructor can not change the object pointer. > That is the whole point.
It does not even know which or how many variables are pointing to it, does it? If this is the case then what does it matter which ones of them are set to nil before or after it is freed? In FreeAndNil it is first freeing the object while the there still exists a reference to it (temp). But the object does not know about temp or var obj anyways and has no reference to any of them (where should it have leaned about them in the first place?), or does it? So IMHO this pocedure is essentially doing exactly the same as the FreeThenNil procedure. At least that is how I understand it. -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
