[fpc-devel] Unicode resource strings

Sven Barth pascaldragon at googlemail.com
Mon Aug 20 22:20:53 CEST 2012


MAm 20.08.2012 20:27 schrieb "Hans-Peter Diettrich" <DrDiettrich1 at aol.com>:
>
> Graeme Geldenhuys schrieb:
>
>> On 20/08/12 08:52, Sven Barth wrote:
>>>
>>>
>>> Just to avoid confusion: The reference counted 2-byte string type on all
>>> platforms is UnicodeString, not WideString (the latter is not reference
>>> counted on Windows platforms).
>>
>>
>> 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.
>
>
> 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.

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.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20120820/bcc7b631/attachment.html>


More information about the fpc-devel mailing list