[fpc-devel] Proof of Concept ARC implementation
Sven Barth
pascaldragon at googlemail.com
Mon Oct 27 23:29:40 CET 2014
Am 27.10.2014 21:00, schrieb Hans-Peter Diettrich:
> Sven Barth schrieb:
>> Am 27.10.2014 17:20 schrieb "Hans-Peter Diettrich"
>> <DrDiettrich1 at aol.com <mailto:DrDiettrich1 at aol.com>>:
>
>> > Something like ShortString and AnsiString?
>>
>> With the difference that Short- and AnsiString are assignable to
>> eachother while Jonas does not want that for reference counted and
>> ordinary classes.
>
> Where would this matter? When TObject and TManagedObject are different
> (base) types, a direct assignment of references is impossible.
Take unit Typinfo for example where quite some methods take a TObject
instance. Or all those classes (TStrings, TObjectList, TComponent, etc.)
that somewhere take a TObject as parameter.
>
>> What do you mean with "virtual counting methods"?
>
> Overriding these methods can enable/disable refcounting for a class,
> and all classes derived from it. The default then can be to do nothing
> (no counting).
But then it's the same reference counting as the COM one, because
without the COM reference counting those virtual methods would not be
called.
>> The main reason I decided not to introduce reference counting for
>> every class was that some people feared the performance impact of the
>> reference counting. Though Florian said that it shouldn't be that bad
>> on today's CPUs...
>
> Did you ever benchmark your model?
Nope. Was glad to have gotten it out to the public with all those
distractions I have in my free time ;)
Regards,
Sven
More information about the fpc-devel
mailing list