[fpc-pascal] Reference Counting
cobines at gmail.com
Mon Apr 5 08:41:24 CEST 2010
2010/4/5 Werner Van Belle <werner at yellowcouch.org>:
>> Pest was just a reference pointer to the first instance, so no need to
>> free it. But setting it to nil after Test was freed is a good habit.
> I'm not sure that is correct. Once you free Test, Pest still points to
> the same non existing object and you can use assigned to check it,
Pest would be a dangling pointer and should not be accessed.
I attached sample code with interfaces for you.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1133 bytes
Desc: not available
More information about the fpc-pascal