[fpc-devel] Pascal Smart Pointers Idea + ARC implementation

Michael Van Canneyt michael at freepascal.org
Sat Oct 10 13:32:18 CEST 2015

On Sat, 10 Oct 2015, Sven Barth wrote:

> Am 10.10.2015 12:15 schrieb "Michael Van Canneyt" <michael at freepascal.org>:
>>> Just allow those three
>>> operator overloads for normal records and have them be present in the
> Init
>>> RTTI of the record so that fpc_initialize(), fpc_finalize() and
> fpc_copy()
>>> can pick them up. This will be needed anyway should such records be
> placed
>>> in arrays or other records or classes. (Of course from great power comes
>>> great responsibility ;) )
>> I don't know how this works internally.
>> Is fpc_initialize called for every record type ? I sincerely hope not.
> For every variant, managed type and record with init RTTI (which is the
> case if the record contains a variant, a managed type or a record with init
> RTTI). Same for fpc-copy and fpc_finalize. Records that contain managed
> operators would simply fall under the category "record with init RTTI as
> well", those that don't wouldn't have an init RTTI (at least if they don't
> fullfill the criteria for it anyway ;) ).
>> Does the compiler check the actual RTTI to decide whether fpc_initialize
> and friends are called ?
> As said above only on types that directly or indirectly need it.

All clear, and I hope to see an ARC implementation based on this "really soon" :-)


More information about the fpc-devel mailing list