Re: [fpc-pascal] dynamic array reference count

2014-03-17 Thread Michael Schnell
On 03/15/2014 03:20 PM, Jürgen Hestermann wrote: I added the last sentence which may help you to avoid false assumptions: Well done ! OTHO, IMHO this perfectly documents that the decision (supposedly by Borland) ) to do it this way is a very nasty and the conceptional difference between St

Re: [fpc-pascal] dynamic array reference count

2014-03-15 Thread Michael Van Canneyt
On Sat, 15 Mar 2014, Xiangrong Fang wrote: Thanks, this is important to know! The latest version of the docs mentions this explicitly: http://www.freepascal.org/docs-html/ref/refsu18.html#x42-460003.3.1 Michael. ___ fpc-pascal maillist - fpc-pa

Re: [fpc-pascal] dynamic array reference count

2014-03-15 Thread Xiangrong Fang
​Thanks, this is important to know!​ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] dynamic array reference count

2014-03-15 Thread Jürgen Hestermann
Am 2014-03-15 15:06, schrieb Xiangrong Fang: > I just want to confirm one thing: > var > a, b: array of Integer; > begin > SetLength(a, 100); > SetLength(b, 100); > a := b; > end. > Now "a" will point to the same memory block as "b". Since dynamic arrays are ref counted, > I don't need to

[fpc-pascal] dynamic array reference count

2014-03-15 Thread Xiangrong Fang
Hi there, I just want to confirm one thing: var a, b: array of Integer; begin SetLength(a, 100); SetLength(b, 100); a := b; end. Now "a" will point to the same memory block as "b". Since dynamic arrays are ref counted, I don't need to worry about the memory originally allocated for "a",