how to allocate class without gc?

Igor via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jan 26 05:56:39 PST 2016


On Tuesday, 26 January 2016 at 09:32:06 UTC, Daniel Kozak wrote:
> V Tue, 26 Jan 2016 05:47:42 +0000
> Igor via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com>
> napsáno:
>
>> On Tuesday, 26 January 2016 at 05:11:54 UTC, Mike Parker wrote:
>> > [...]
>> 
> Can you try it with GC.disable()?

//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.
		


More information about the Digitalmars-d-learn mailing list