Re: [fpc-pascal] A warning when Blockwriting/reading dynamic array pointers

2011-04-02 Thread Jonas Maebe
On 02 Apr 2011, at 19:36, Jürgen Hestermann wrote: > Jonas Maebe schrieb: > > If you don't want the compiler to interfere with anything you do, do not > > use automated types such as ansistring, unicodestring, dynamic array and > > COM-style interfaces. The whole point of these types is that th

Re: [fpc-pascal] A warning when Blockwriting/reading dynamic array pointers

2011-04-02 Thread Jürgen Hestermann
Jonas Maebe schrieb: > If you don't want the compiler to interfere with anything you do, do not use automated types such as ansistring, unicodestring, dynamic array and COM-style interfaces. The whole point of these types is that the compiler will do lots of stuff behind your back, because with

Re: [fpc-pascal] A warning when Blockwriting/reading dynamic array pointers

2011-04-02 Thread Jürgen Hestermann
DaWorm schrieb: > IMO, a dynamic array should never be part of a structure that is > passed to BlockWrite in the first place. Not that I use many dynamic > arrays in the first place, but to me they pass over the border between > simple data types (that are fine for BlockWrite) and managed data >

Re: [fpc-pascal] A warning when Blockwriting/reading dynamic array pointers

2011-04-02 Thread Jonas Maebe
On 02 Apr 2011, at 18:19, Jürgen Hestermann wrote: > >> I would never expect an assignmet to nil changing anything else than just > >> the value of the pointer. And for (all?) other pointers this expectation > >> is valid. > > That expectation is not valid for any reference counted type (be it

Re: [fpc-pascal] A warning when Blockwriting/reading dynamic array pointers

2011-04-02 Thread DaWorm
IMO, a dynamic array should never be part of a structure that is passed to BlockWrite in the first place. Not that I use many dynamic arrays in the first place, but to me they pass over the border between simple data types (that are fine for BlockWrite) and managed data types (that have quite a lo

Re: [fpc-pascal] A warning when Blockwriting/reading dynamic array pointers

2011-04-02 Thread Jürgen Hestermann
>> I would never expect an assignmet to nil changing anything else than just the value of the pointer. And for (all?) other pointers this expectation is valid. > That expectation is not valid for any reference counted type (be it a dynamic array, ansistring, unicodestring, COM-style interfaces).

Re: Re[6]: [fpc-pascal] TIniFile crash/memory loss

2011-04-02 Thread Bart
On 4/1/11, DaWorm wrote: > On Fri, Apr 1, 2011 at 9:09 AM, Bart wrote: > It > seems to me like a lot of effort to trap something that will rarely > happen. But it does happen. I don't mind that it raises an exception in Destroy (although I find it rather odd), but the consequences of raising t