bearophile wrote: > In your RAII example you are doing something that's scary, mixing C heap > allocations with D GC heap allocations with C free. You're right, the buf.dup code is not only scary, it's dead wrong. My screw up. Derp, derp.