Op 2021-02-17 om 00:02 schreef Benito van der Zander via fpc-pascal:

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

(1) A record is not a pointer. So that would require some implicit referencing in the property

(2) If it was managed, it would be an allocation, so I don't understand this.


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

Reply via email to