Struct destructors not always called?

Jeremy DeHaan via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Dec 27 11:04:11 PST 2015


On Sunday, 27 December 2015 at 18:47:52 UTC, Adam D. Ruppe wrote:
> On Sunday, 27 December 2015 at 18:40:55 UTC, Jeremy DeHaan 
> wrote:
>> I was playing around with some code today and I noticed that 
>> in some cases struct destructors are not called.
>
> struct destructors are called when the struct ceases to exist 
> in the program.
>
> A global variable never ceases to exist as long as the program 
> lives.

So are these left dangling or do they actually get cleaned up at 
the program exit?


More information about the Digitalmars-d-learn mailing list