I assume taking a slice of a pointer uses the GC, so this cannot be @nogc, am I right?
Nope, slicing never allocates, it just takes an address and length.
If you append to a slice or increase the length though, the GC might reallocate it.
I assume taking a slice of a pointer uses the GC, so this cannot be @nogc, am I right?
Nope, slicing never allocates, it just takes an address and length.
If you append to a slice or increase the length though, the GC might reallocate it.