So I've started using the record management operators in earnest and see a real 
need for another “Move” operator in order to prevent the constant unnecessary 
copies. If you look at the example in the bug report you’ll see where adding a 
Move operator will save you 2 copies and that it works as a companion to the 
Copy operator, meaning if you don’t declare Move then Copy will be called by 
default.

I don’t think I captured all instances where a copy could be detected (I could 
use some help there) but at least it works in the most common situations. I 
think it’s a no-brainer to include this but I wanted to post the patch so you 
could see how it worked and if it’s worth it in terms of added complexity.

https://bugs.freepascal.org/view.php?id=35825

Regards,
        Ryan Joseph

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

Reply via email to