Re: copy one character from a string.
- From: "Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 24 Nov 2005 12:04:03 +0100
<alanglloyd@xxxxxxx> wrote in message
news:1132826429.569524.307220@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[...]
> S2:=S1; // S2 now points to S1, only one instance exists in memory.
> // The string has a refcount of 2.
> SetLength(S2, Length(S2)); // S2 is now copied into a newly allocated
> // string, both S1 and S2 having a refcount
> // of 1.
If I wanted a refcount of 1, I'd call UniqueString. Not because SetLength
doesn't guarantee the refcount (it does), but because I feel it shouldn't.
Groetjes,
Maarten Wiltink
.
- Follow-Ups:
- Re: copy one character from a string.
- From: alanglloyd@xxxxxxx
- Re: copy one character from a string.
- References:
- copy one character from a string.
- From: MLian
- Re: copy one character from a string.
- From: Dodgy
- Re: copy one character from a string.
- From: MLian
- Re: copy one character from a string.
- From: Bjørge
- Re: copy one character from a string.
- From: alanglloyd@xxxxxxx
- copy one character from a string.
- Prev by Date: Re: Writing Binary Files with TFileStream
- Next by Date: Re: copy one character from a string.
- Previous by thread: Re: copy one character from a string.
- Next by thread: Re: copy one character from a string.
- Index(es):