> On Aug 17, 2018, at 7:19 PM, Sven Barth via fpc-pascal
> <[email protected]> wrote:
>
> However for classes there is the problem of temporary variables. Take a := b
> + c + d. That is essentially compiled as t := b + c; a := t + d. The compiler
> does not know whether the operator creates an instance or not (yes, there are
> circumstances when it can know that, but for the general case it can't) and
> thus this would potentially lead to memory leaks.
>
I’m must be confused because classes already have operator overloads, they’re
just in global scope outside of the class itself. Don’t all the same rules
apply if the syntax is put inside the class (like in records) just the scope
rules change?
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal