how to allocate class without gc?

Mike via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jan 26 03:01:16 PST 2016


On Tuesday, 26 January 2016 at 01:09:50 UTC, Igor wrote:
> Is there any examples that shows how to properly allocate an 
> object of a class type with the new allocators and then release 
> it when desired?

There are a number of different patterns discussed and 
illustrated with examples at 
http://wiki.dlang.org/Memory_Management.  These don't use 
std.experimental.allocator, but should serve as a pretty good 
foundation for doing so.

Mike


More information about the Digitalmars-d-learn mailing list