symbolless stack allocation

Jay via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Sep 10 13:06:34 PDT 2014


On Wednesday, 10 September 2014 at 19:39:17 UTC, Ali Çehreli 
wrote:

> > scope c = new C();
>
> That usage of 'scope' is deprecated. There is 
> std.typecons.scoped instead.

actually i read about 'scoped' here 
http://ddili.org/ders/d.en/destroy.html (thanks for the tutorial 
btw) but i thought that 'scoped() wraps the class object inside a 
struct' means that the struct contains a reference to a heap 
allocated object. i guess i should've looked up the documentation 
for 'scoped'. thanks.


More information about the Digitalmars-d-learn mailing list