<p><br>
MAm 20.08.2012 20:27 schrieb "Hans-Peter Diettrich" <<a href="mailto:DrDiettrich1@aol.com">DrDiettrich1@aol.com</a>>:<br>
><br>
> Graeme Geldenhuys schrieb:<br>
><br>
>> On 20/08/12 08:52, Sven Barth wrote:<br>
>>><br>
>>><br>
>>> Just to avoid confusion: The reference counted 2-byte string type on all<br>
>>> platforms is UnicodeString, not WideString (the latter is not reference<br>
>>> counted on Windows platforms).<br>
>><br>
>><br>
>> Please correct me if I am wrong, but I think WideString was reference counted an all platforms "in the beginning" - like Martin mentioned. Later it was changed, and the new UnicodeString become the "reference counted on all platforms" type.<br>
><br>
><br>
> WideStrings on Windows platforms are allocated in *system* space, so that they can be used across processes. Reference counting can occur only according to the Windows (COM) rules. Delphi UnicodeStrings are stored in the (local) program space instead, so that local reference counting can be used. Dunno about passing such strings to other processes, though.</p>
<p>The point that Martin and Graeme made was that at the beginning of WideString support in the compiler (1.9.x or so...) WideString was implemented in a refcounted way like UnicodeString is today. Only later on WideString on Windows was changed to be the COM compatible string type we know from Delphi.</p>
<p>Regards,<br>
Sven</p>