[fpc-devel] Proof of Concept ARC implementation
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Mon Oct 27 20:49:50 CET 2014
Kostas Michalopoulos schrieb:
> On Mon, Oct 27, 2014 at 5:17 PM, Hans-Peter Diettrich
> <DrDiettrich1 at aol.com <mailto:DrDiettrich1 at aol.com>> wrote:
>
> Then the compiler can safely generate refcounting code for *all*
> objects and non-weak references, and the counting methods take care
> of required operations
>
>
> Wouldn't that cause all objects to "pay" (both in terms of performance
> and memory) for something that they don't use?
Right, that's why I suggest to keep both models separate. But the real
runtime impact has to be benchmarked - it may be as low as with other
managed types (AnsiString...), where nobody has complaints. Memory usage
(4 bytes per object) should not matter, Delphi accepts it just for
mobile devices!
> IMO it is better to fully
> disallow subclasses from introducing reference counting than force
> functionality on objects that they don't need to use.
It *looks* better, but has several issues.
DoDi
More information about the fpc-devel
mailing list