On 13-1-2011 21:40, Sven Barth wrote:

WideString on Windows has no reference counting, thus everytime a WideString is assigned it needs to be copied.
Not exactly true. widestring is com marshaled and thus has reference counting on the com level. afaik . As long as your memorymanager is com marshaled too, that is. And since most pascal memory manager versions do not support com directly, it goes wrong in a big way. I once wrote a simple com memory manager to test this. Performance stays sh*t, but strings seem to be counted, not copied. If you use coTaskMemAlloc, coTaskMemFree,CoTaskMemRealloc in your memory manager you will see what I mean.
At least it comes close, but slow it will stay.


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

Reply via email to