Actual lifetime of static array slices?

Mike Parker aldacron at gmail.com
Tue Nov 15 02:55:52 UTC 2022


On Tuesday, 15 November 2022 at 02:49:55 UTC, Mike Parker wrote:

> It's not the scope that matters here. It's the stack. Memory 
> allocated in the inner scope uses the function stack, so it's 
> all valid until the function exits.

And that was just so, so wrong. Of course destructors get called 
when scopes exit, etc.


More information about the Digitalmars-d-learn mailing list