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?
- Slices and GC BLM
- Re: Slices and GC Vladimir Panteleev
- Re: Slices and GC BLM
- Re: Slices and GC Dmitry Olshansky
- Re: Slices and GC Jonathan M Davis