DMD leaks memory all over. The idea is that a GC should be used in DMD, it just isn't done that way today. So in general, leaking memory is 'fine'...

Although I question the need to do any string manipulation in the *compiler*.