Classes and Structs, Memory management questions

dom via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Sep 2 02:40:48 PDT 2016


On Friday, 2 September 2016 at 08:59:38 UTC, Andrea Fontana wrote:
> On Friday, 2 September 2016 at 08:54:33 UTC, dom wrote:
>> i haven't read it fully yet, but i think this DIP contains 
>> some or all of my concerns
>> https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md
>
> Check this:
> https://dlang.org/phobos/std_experimental_allocator.html

thx that is very interesting. it seems like that can cover very 
complex allocation schemes with a general interface!

i have also found this to allocate a class on the stack
http://dlang.org/phobos/std_typecons.html#.scoped
class A { ... }
auto instance = scoped!A();

that has even quite a nice syntax!


More information about the Digitalmars-d-learn mailing list