On 23/01/12 15:38, ik wrote:
PChar is an array like approach. AnsiString, is a record based pointer.

AnsiString also stores the string in an array. It is dynamic, though, so it stores the size and also reference count.

It uses more memory, and provide a bit overhead for the same thing.
At least on theory. I would love to learn that it's not the case.

The only thing you save on here is reference counting, which is probably negligible. That's why I asked if you benchmarked it. Especially since you've already created a bug in trying to use pchar.

Henry
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to