Am 05.02.2011 10:46, schrieb Bo Berglund:
But that is not what I am doing at all, so I can stick with a simple:

FillArr(Arr: TByteArr)

and be sure that I will not get back a different array, but instead
get my array filled as requested...


As soon as you call SetLength, this will break havoc. Then a deep copy is generated and it gets ref. count of 1 and it is destroyed at callee exit.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to