Revert "Revert "DO NOT MERGE Fix extraneous allocation and copying""

This reverts commit af60e56b39582ea90ccd7601cd06350a50bf6500.

Change-Id: I1aa698608773b9e540457831e11218f371c71268
1 file changed