[fpc-devel] Proof of Concept ARC implementation

Sven Barth pascaldragon at googlemail.com
Mon Oct 27 23:26:10 CET 2014


Am 27.10.2014 21:06, schrieb Marco van de Voort:
>
>> - TObject and all descendants are reference counted (please no size and
>> performance discussion here)
> No they are not. Of course they are not. That would be stupid.
Sorry, I don't get what you're trying to say here. Would you please 
elaborate?
>
>> - in code that does not use ARC ("modeswitch arc off" - the default; or
>> maybe better a local directive) all instance variables are considered "weak"
> But Tobject becomes bigger yet again. This is a *ROOT* class, the D2009
> additions are already painful enough without voluntarily adding to it.
The D2009 additions are only /per class/ and not per instance. The 
instance size of TObject in trunk is still 4 (or 8 on 64-bit), in my 
branch it's 8 or 12. Also we can not avoid this as sooner or later we'll 
need TMonitor support as well which in Delphi uses a pointer field that 
is part of TObject (though I'm working on an idea to implement this 
without extending TObject).
>> With this approach there would be no change for legacy code
> So now this is the way to go forward by default. Hell no!
And people wonder why I didn't go and simply implemented it in trunk :P

Regards,
Sven



More information about the fpc-devel mailing list