[fpc-devel] Suggestion: reference counted objects

Sven Barth pascaldragon at googlemail.com
Thu Sep 25 11:52:43 CEST 2014

Am 25.09.2014 11:04 schrieb "Michael Schnell" <mschnell at lumino.de>:
> On 09/22/2014 02:34 PM, Sven Barth wrote:
>> I already suggested the addition of a TARCObject as a general reference
counted base class in my RFC ;)
> Sounds nice, but is it (easily) possible to implement that the compiler
magic for doing the ref-counting is issued exactly whenever the TARCObject
is an ancestor ?

TARCObject would just be provided for convenience reasons. The real magic
is a keyword that can be used for any class to enable ARC for that class
and all it's descendant.

And even if TARCObject would be special the compiler know the full
hierarchy anyway otherwise it couldn't decide which methods to call.

> Such decision seems like unprecedented yet.

Nope. Normal compiler business.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20140925/01f90dab/attachment.html>

More information about the fpc-devel mailing list