Re: Destructor call

2018-04-10 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/10/18 3:24 PM, Jonathan M Davis wrote: On Tuesday, April 10, 2018 18:52:19 kinke via Digitalmars-d-learn wrote: On Tuesday, 10 April 2018 at 18:34:54 UTC, n0fun wrote: Why the destructor is called in the second case and why not in the first? The first case is RAII, where destruction

Re: Destructor call

2018-04-10 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, April 10, 2018 18:52:19 kinke via Digitalmars-d-learn wrote: > On Tuesday, 10 April 2018 at 18:34:54 UTC, n0fun wrote: > > Why the destructor is called in the second case and why not in > > the first? > > The first case is RAII, where destruction isn't done for not > fully constructed

Re: Destructor call

2018-04-10 Thread kinke via Digitalmars-d-learn
On Tuesday, 10 April 2018 at 18:34:54 UTC, n0fun wrote: Why the destructor is called in the second case and why not in the first? The first case is RAII, where destruction isn't done for not fully constructed instances. The second case is GC finalization at program shutdown and looks like a