Re: [fpc-devel] Access Violation withnested DLL'scompiledbyFPC(andsome more info on bug #4538)

2005-12-17 Thread Florian Klaempfl
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()

Re: [fpc-devel] Access Violation withnested DLL'scompiledbyFPC(andsome more info on bug #4538)

2005-12-15 Thread Marc Weustink
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

Re: [fpc-devel] Access Violation withnested DLL'scompiledbyFPC(andsome more info on bug #4538)

2005-12-15 Thread Jonas Maebe
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

Re: [fpc-devel] Access Violation withnested DLL'scompiledbyFPC(andsome more info on bug #4538)

2005-12-14 Thread L505
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