Confusion regarding struct lifecycle

ZombineDev via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Feb 16 23:10:15 PST 2016


On Wednesday, 17 February 2016 at 02:44:04 UTC, Matt Elkins wrote:
> On Wednesday, 17 February 2016 at 02:23:52 UTC, Ali Çehreli 
> wrote:
>> [...]
>
> Oof. This strikes me as a "gotcha", that this happens even with 
> @disable this() as opposed to a compiler error. Is this only 
> for static arrays, or are there other places @disable this() is 
> silently ignored?
>
>> [...]
>
> Ok, I think that pretty much explains the behavior I was seeing 
> in the reduced case. Thanks -- that's helpful to know!
>
> The downside is that it really indicates that I didn't reduce 
> my buggy program properly. I'll hold out for the 
> live-object-destructor-call fix to see whether that corrects my 
> problem; I can just leak resources until then :).

BTW, you can try the nighly build which should include the bug 
fix:
http://dlang.org/download.html


More information about the Digitalmars-d-learn mailing list