[fpc-pascal]Destroy Instance

Sebastian Günther sguenther at gmx.de
Tue Jan 28 20:17:27 CET 2003


Luis Del Aguila schrieb:

>   b.destroy;             //if destroy the instance .
>   Writeln(b.campo2);     // Why the instance exist?

You have to call b.Free instead of b.Destroy to properly destruct the 
instance.

And don't forget that the destruction will free the memory, but not 
override it with some initialization value; so it is possible that 
b.campo2 will still hold a value.


- Sebastian




More information about the fpc-pascal mailing list