> Calling dispose() on a record with a dynamic array field will free the
> array (and recursively finalize all its elements) as long as the
> pointer on which you call it is correctly typed in the source code.
> The fact that you still get memory leaks after everything you are
> doing suggests tha
On 25 Feb 2011, at 14:02, Wimpie Nortje wrote:
Initially I only disposed the record. This lead to lots of memory
leaks.
Then I set dynarray:= nil before disposing the record. Less mem leaks,
but still a lot.
Then I started to finalize the dynamic array before disposing the
record. A huge impr
Thanks for the resonse Jonas
>> Is it safe to create a dynamic array with setlength() in one thread and
>> free the array using finalize() in another thread?
>
> Normally, you should not call finalize() on dynamic arrays. When the
> last reference to a dynamic array goes out of scope, it is finalis
On 25 Feb 2011, at 13:28, Wimpie Nortje wrote:
Is it safe to create a dynamic array with setlength() in one thread
and
free the array using finalize() in another thread?
Normally, you should not call finalize() on dynamic arrays. When the
last reference to a dynamic array goes out of scop
Hi,
Is it safe to create a dynamic array with setlength() in one thread and
free the array using finalize() in another thread?
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal