Hi,

And there often is a lot of unintentional deep copying. This is also why a property returning a record is fairly useless except for extremely small records like TPoint (and even that is not optimal no

But a managed record to replace an interface, would only contain a single pointer/class ref. That can be copied fast



Bye,
Benito
On 16.02.21 21:49, Marco van de Voort via fpc-pascal wrote:

Op 2021-02-16 om 21:33 schreef Ryan Joseph via fpc-pascal:

On Feb 16, 2021, at 1:27 PM, Marco van de Voort via fpc-pascal <fpc-pascal@lists.freepascal.org> wrote:

And there often is a lot of unintentional deep copying. This is also why a property returning a record is fairly useless except for extremely small records like TPoint (and even that is not optimal no
deep copying? You mean from ref counted types like "array of" and ansistring?

No, use of TP objects and records in e.g. properties in not carefully crafted code. They are a lot less userfriendly.


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to