What to do with InvalidMemoryOperationError

"Nordlöw" via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jan 21 04:10:19 PST 2015


On Wednesday, 21 January 2015 at 12:00:47 UTC, Nordlöw wrote:
> My executable throws as
>
>     core.exception.InvalidMemoryOperationError@(0)

I've tracked it down to being caused by

     foreach (line; File(path).byLine) {}

when path contains a very large text file (392 MB, 1658080 lines).

Do I have any alternatives to this that doesn't trigger exception?


More information about the Digitalmars-d-learn mailing list