Slices and GC
Jonathan M Davis
jmdavisProg at gmx.com
Thu Apr 5 11:37:25 PDT 2012
On Thursday, April 05, 2012 17:00:03 BLM wrote:
> Recently I've been working on some projects that involve parsing
> binary files. I've mainly been using std.file.read() to get the
> whole file as a huge array and then extracting slices. I had
> initially assumed that the GC would free any chunks of the array
> that didn't end up being referenced by these slices, but after
> reading some more, it looks like the whole array is kept in
> memory even if only a few elements are actually referenced. Is
> this actually the case? If so, might the language be extended to
> handle this situation?
http://dlang.org/d-array-article.html
- Jonathan M Davis
More information about the Digitalmars-d
mailing list