This removes one allocation per line, which for large files can
lead to a significant performance win.
The potential downside would be that weak pointers keep the line
alive, but we do not use that anywhere afaik.