Allocating a wstring on the stack (no GC)?
Meta via Digitalmars-d
digitalmars-d at puremagic.com
Wed May 7 11:34:09 PDT 2014
On Wednesday, 7 May 2014 at 18:29:23 UTC, Brad Anderson wrote:
> Unless I'm misunderstanding it should be as simple as:
>
> wchar[100] stackws; // alloca() if you need it to be
> dynamically sized.
>
> A slice of this static array behaves just like a slice of a
> dynamic array.
But you should avoid slicing the static array unless it's via
arr.dup.
More information about the Digitalmars-d
mailing list