- Original Message -
From: "DrDiettrich" <[EMAIL PROTECTED]>
To: "FPC developers' list"
Sent: Tuesday, February 15, 2005 4:11 AM
Subject: Re: [fpc-devel] Bug in PWidechar and refcounting
Alexey Barkovoy wrote:
PAnsiChar, PChar are just pointers and no
> Alexey Barkovoy wrote:
>> PAnsiChar, PChar are just pointers and not garbage collected by
>> compiler. But
>> AnsiString and WideString are compiler managed types. So, as Peter
>> mentioned,
>> behaviour you are seeing is by design.
>
> In Delphi WideString is not reference counted at all. The la
Alexey Barkovoy wrote:
> PAnsiChar, PChar are just pointers and not garbage collected by compiler. But
> AnsiString and WideString are compiler managed types. So, as Peter mentioned,
> behaviour you are seeing is by design.
In Delphi WideString is not reference counted at all. The layout of the
st
> Hi all,
>
> the bug-report on the website doesn't work, so I write a mail:
>
> If you assign a widechar to a pwidechar, the refcount isn't
> increased. This construct is often used in the variants-code, which is
> allowed, according to the comments at the top of wstrings.inc.
>
> An example:
>
>
> Hi all,
>
> the bug-report on the website doesn't work, so I write a mail:
>
> If you assign a widechar to a pwidechar, the refcount isn't
> increased. This construct is often used in the variants-code, which is
> allowed, according to the comments at the top of wstrings.inc.
>
> An example:
>
>
> Hi all,
>
> the bug-report on the website doesn't work, so I write a mail:
>
> If you assign a widechar to a pwidechar, the refcount isn't
> increased. This construct is often used in the variants-code, which is
> allowed, according to the comments at the top of wstrings.inc.
>
> An example:
>
>
Normally I would aggree with you, but as far as I can see, PWideChar is
also an automated type. (If not then large parts of the variant-code in
the RTL has to be rewritten, and probably alsoe the wstrings.inc file)
From wstrings.inc:
WideString is defined as a 'silent' pwidechar :
a pwidechar tha
> if when someone does pcharvar := ansistringvar or pwidecharvar :=
> widestringvar we increased the refcount every program that used that
> construct would leak memory.
Normally I would aggree with you, but as far as I can see, PWideChar is
also an automated type. (If not then large parts of the
elopers' list
> Subject: [fpc-devel] Bug in PWidechar and refcounting
>
>
> Hi all,
>
> the bug-report on the website doesn't work, so I write a mail:
>
> If you assign a widechar to a pwidechar, the refcount isn't
> increased. This construct is often used in
Hi all,
the bug-report on the website doesn't work, so I write a mail:
If you assign a widechar to a pwidechar, the refcount isn't
increased. This construct is often used in the variants-code, which is
allowed, according to the comments at the top of wstrings.inc.
An example:
Program test;
var
10 matches
Mail list logo