On Sat, Sep 21, 2013 at 7:23 AM, bearophile <bearophileh...@lycos.com>wrote:

> simendsjo:
>
>
>  I'm setting every element in the array, and every field of the
>> element, so I should be safe, right?
>>
>
> I think that's sufficiently safe. If the GC run before you have
> initialized those fields, and some of those fields are references/pointers,
> that could cause memory leaks until the next time the GC runs.
>
>
just to clarify:
is the following true?

int*[N] a=void;
foreach(i;N)
  a[i]=fillValue(i);// some leaks may occur during foreach loop
//at the next GC run, no more leaks due to that piece of code





> Bye,
> bearophile
>
>

Reply via email to