FG: > GC.free(cast(void*)s); Don't cast arrays arrays to pointers, it's unclean, because dynamic arrays are two words long. Use the .ptr property: GC.free(s.ptr); Or if the precedent doesn't work: GC.free(cast(void*)s.ptr); Bye, bearophile