dispose: bug or feature?

Adriaan van Os gpc at microbizz.nl
Thu Dec 13 11:30:27 CET 2007

Frank Heckenbach wrote:
> Not really -- it's more for convenience (not having to check for nil
> before each Dispose; we might have let Dispose set to the pointer to
> nil afterwards as well if it was reliable; as has been pointed out
> in this thread, it's not).

There is no replacement in programming for the necessity of careful thinking with everything you 
do. There is no such thing like absolute "safety" against programming errors. In that regard, any 
discussion about "safety" is pointless. But, as Peter pointed out, defensive programming will help. 
Especially if accompanied with good design (for example, it should be crystal clear in the software 
who owns the pointer).


Adriaan van Os

More information about the Gpc mailing list