On Tuesday, 26 January 2016 at 13:56:39 UTC, Igor wrote:
//ubyte[__traits(classInstanceSize, App)] buffer;auto buffer = core.stdc.stdlib.malloc(__traits(classInstanceSize, App))[0..__traits(classInstanceSize, App)];works, so it is the ubyte line.
Make sure the buffer outlives the class instance.If you emplace on the stack, then at the end of the scope your instance is gone.