> Does this happen too if you declare a dynamic array locally in a function and leave this function?
The global rule: as soon as the reference count reaches 0, the array gets unallocated, wherever it's declared and as long as it's accessed normally without any hack. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/why-dynamic-array-created-in-constructor-not-automatically-free-in-destructor-tp5719897p5719902.html Sent from the Free Pascal - General mailing list archive at Nabble.com. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal