Confusion regarding struct lifecycle

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Feb 17 11:40:51 PST 2016


On 02/17/2016 11:37 AM, anonymous wrote:

 > However, the code from this thread still prints
 >
 > ----
 > Before 8
 > Before 1
 > Foo being destroyed: 0
 > Before 2
 > Foo being destroyed: 0
 > Before 3
 > Foo being destroyed: 0
 > After Foo construction
 > About to lose scope
 > Foo being destroyed: 0
 > Foo being destroyed: 3
 > Foo being destroyed: 2
 > Foo being destroyed: 1
 > Foo being destroyed: 8
 > ----
 >
 > So, different issue?

I thought so and opened the following yesterday:

   https://issues.dlang.org/show_bug.cgi?id=15694

Ali



More information about the Digitalmars-d-learn mailing list