[fpc-devel] Suggestion: reference counted objects

silvioprog silvioprog at gmail.com
Sat Sep 20 19:34:02 CEST 2014


On Sat, Sep 20, 2014 at 10:24 AM, Chriss Kalogeropoulos <
iz.iznogood at gmail.com> wrote:

> Hello all,
>
> IMO the best way to implement this is by controlling the TObject behaviour
> through a compiler switch, something like "enable globally", "disable
> globally", "enable for specific class" and in the latter case another
> switch should mark the class that should have this behaviour enabled.
>
Very nice idea, somethink like "{$ARC+}", enabled by default in FPC 2.8.0,
IMHO. :-)

And it could provide an object like "TManagedObject" too, to use if
"{$ARC-}".

> This should allow the compiler to emit different code per case.
>
> But the question is what should be the behaviour for genetics and also how
> should it work for packages (when and if they are implemented).
> Also should this reference count be shared for interfaced classes or not?
>
> Chriss
>

-- 
Silvio Cl├ęcio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20140920/51d7f8fc/attachment.html>


More information about the fpc-devel mailing list