[Lazarus] Object free itself?
Marc Weustink
marc at dommelstein.net
Fri May 16 00:30:15 CEST 2008
Graeme Geldenhuys wrote:
> 2008/5/15 Lee Jenkins <lee at datatrakpos.com>:
>> I've never tried this type of thing before, but I have need to have an object
>> free self.
>
> Not allowed, as far as I know. The execution point has nowhere to
> return to after the 'inherited Destroy' line and before the 'end' of
> the destructor.
Nope, when destructing, you destroy the data instance of your object,
not the code. So the code will continue, however you cannot axxess any
field of your object anymore.
(what I wrote is valid for classes, for objects you cannot acces
virtuals either)
Marc
More information about the Lazarus
mailing list