On Tuesday, 12 June 2018 at 15:35:42 UTC, Steven Schveighoffer wrote:

No, that's not what I mean. What I mean is:

int[] arr = [1,2,3].s;
int[] arr2 = [4,5,6].s;

Legally, the compiler is allowed to reuse the stack memory allocated for arr for arr2. The lifetime of the arr data is over.

-Steve

https://github.com/p0nce/d-idioms/issues/150

Especially if the stdlib has a way to do this now.

Reply via email to