symbolless stack allocation
    Jay via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Wed Sep 10 11:31:28 PDT 2014
    
    
  
as specified here: 
http://wiki.dlang.org/Memory_Management#Allocating_Class_Instances_On_The_Stack
i can allocate a class instance on the stack (inside a funtion) 
like so:
scope c = new C();
i want to create an instance, call one of its methods, and throw 
it away. like so:
scope new C().doSomething();
can i somehow do away with declaring a local variable and calling 
a method on it?
    
    
More information about the Digitalmars-d-learn
mailing list