L505 wrote:
In short (don't pin me on the names or on exact details in special cases):
Assume you have a ansistring and you assign something to it
S := 'SomeString';
the compiler generates something like
DecStringRef(S);
S - 'SomeString';
IncStringRef(S);
The DecStringRef()
L505 wrote:
In short (don't pin me on the names or on exact details in special cases):
^
there was a reason I said this.
Assume you have a ansistring and you assign something to it
S := 'SomeString';
the compiler
On 15 dec 2005, at 05:45, L505 wrote:
Why does it generate a DecStringRef before you assigned the string?
What if it is the
first time and you are already at 0, it can't decrement it to -1
can it?
The reference count can never be zero, because when it becomes zero
the string is freed
In short (don't pin me on the names or on exact details in special cases):
Assume you have a ansistring and you assign something to it
S := 'SomeString';
the compiler generates something like
DecStringRef(S);
S - 'SomeString';
IncStringRef(S);
The DecStringRef() decrements