Does to!(string)(char[]) do any memory allocation on conversion?

Adam D. Ruppe destructionator at gmail.com
Mon Dec 25 14:39:42 UTC 2017


On Monday, 25 December 2017 at 14:37:01 UTC, Mengu wrote:
> yes, it is allocating memory. you can test such cases with 
> @nogc [0].

nogc is really conservative and thus gives a lot of false 
positives. I'd just compare instr.ptr is outstr.ptr here and see 
if it changes (it will tho)


More information about the Digitalmars-d-learn mailing list