Memory leak in foreach
Andrea Fontana
nospam at example.org
Wed Feb 20 11:55:09 UTC 2019
On Wednesday, 20 February 2019 at 11:05:31 UTC, Dein wrote:
> That's not a memory leak, you are creating a GC array, the GC
> might never free the array its not deterministic. Use @nogc and
> staticArray() if you want to destructors to be called
> deterministically.
No: GC will not free those elements in this case. There's a bug.
The only way to free those elements is to kill the application.
GC doesn't track them at all.
More information about the Digitalmars-d
mailing list