Andrew Brunner wrote:
It most certainly is not "safe". LOL. Free calls destroy.. Destroy may contain other frees and routines... You cannot guarantee that free will even return.
the point was to call .Free on an object that might not have been initialized, not what Free ( or destroy, for the matter) would eventually call _after_, so it _is_ safe.
I guess (well, I just don't remember exactly) Free is safe because it is a class method, hence it _can_ be called on a non initialized object; and therefore can test the object instance against Nil and act consequently.
Someone correct me if I'm wrong on this... ;-) Cheers, A. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal