> Because of the copy-on-write mechanism. The reference count must be
> checked each time you do a write. This is normal. It's the same in
> Delphi, and a good reason for avoiding dynamic arrays.
> 
> You can use pointer arithmetics in FPC, it works as a dynamic array, but
> without the overhead.

This topic (when trying to read it from the beginning to this point) is 
informative about its subject, but very confusing.

I have already been confused with blockread() and dynamic arrays. (It's about 
"formal const" parameter and ability to pass one kind of array as parameter and 
inability to pass the other.)

Also I constantly fear array assignments.

Probably I will use something similar to your example ("manual" dynamic array?).

Could anyone state the reason of the way dynamic arrays are implemented?
Can I "disable" reference counting for some types or something?
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to