[fpc-pascal] Are there any drawbacks to "reference to"?

Jonas Maebe jonas at freepascal.org
Sun Jun 5 21:02:22 CEST 2022

On 2022-06-05 18:20, Anthony Walter via fpc-pascal wrote:

> As the "reference to" feature was recently added to fpc trunk, I'd like 
> to ask if internally there are any penalties (performance perhaps) or 
> drawbacks to using them in place of the more traditional "procedure" 
> and "procedure of object" types?

The downside is that a "reference to" always gets wrapped in a 
reference-counted interface, and hence is much more expensive than a 
place procedural variable ("of object" or not).


More information about the fpc-pascal mailing list