[fpc-devel] Suggestion: reference counted objects

silvioprog silvioprog at gmail.com
Sun Sep 21 18:12:03 CEST 2014


On Sun, Sep 21, 2014 at 9:15 AM, Chriss Kalogeropoulos <
iz.iznogood at gmail.com> wrote:

> Hi Sven,
>
> This design means that old classes need to be subclassed in order to
> enable this feature,  correct?
> Would it be possible instead of declaring this on the class definition, to
> declare it on the actual variable? Something like
>
> var aArcObj: TFooObj; refcounted;
>
> Or similar.
>
> This would allow the same classes to be used both ways.
>
> Also how about a smart pointer record  implementation with generics? Is it
> possible ?
>
> Thanks,
> Chriss
>

Or enabling via compiler switch, like:

http://docwiki.embarcadero.com/RADStudio/XE4/en/Automatic_Reference_Counting_in_Delphi_Mobile_Compilers

-- 
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/20140921/3f31533d/attachment.html>


More information about the fpc-devel mailing list