Throwing constructors and member destructors

2018-11-20 Thread Boris-Barboris via Digitalmars-d-learn
https://run.dlang.io/is/LdylJX Notice no "B destructor" line in stdout. Just got bitten by the assumption that my Buffer struct that transactionally aquires multiple external resources in constructor will rollback via member destructors that were successfully completed before the throw. Can

Re: Throwing constructors and member destructors

2018-11-20 Thread Alex via Digitalmars-d-learn
On Tuesday, 20 November 2018 at 13:01:40 UTC, Boris-Barboris wrote: https://run.dlang.io/is/LdylJX Notice no "B destructor" line in stdout. Just got bitten by the assumption that my Buffer struct that transactionally aquires multiple external resources in constructor will rollback via member

Re: Throwing constructors and member destructors

2018-11-20 Thread Stanislav Blinov via Digitalmars-d-learn
On Tuesday, 20 November 2018 at 13:01:40 UTC, Boris-Barboris wrote: https://run.dlang.io/is/LdylJX Notice no "B destructor" line in stdout. Just got bitten by the assumption that my Buffer struct that transactionally aquires multiple external resources in constructor will rollback via member

Re: Throwing constructors and member destructors

2018-11-20 Thread Boris-Barboris via Digitalmars-d-learn
On Tuesday, 20 November 2018 at 13:20:08 UTC, Stanislav Blinov wrote: https://dlang.org/changelog/2.083.0.html#reboot14246 Nvm, found the info in the issue tracker, thank you for the link.

Re: Throwing constructors and member destructors

2018-11-20 Thread Boris-Barboris via Digitalmars-d-learn
On Tuesday, 20 November 2018 at 13:20:08 UTC, Stanislav Blinov wrote: https://dlang.org/changelog/2.083.0.html#reboot14246 Wording "object" means both classes and structs?

Re: Throwing constructors and member destructors

2018-11-20 Thread Stanislav Blinov via Digitalmars-d-learn
On Tuesday, 20 November 2018 at 13:28:21 UTC, Boris-Barboris wrote: On Tuesday, 20 November 2018 at 13:20:08 UTC, Stanislav Blinov wrote: https://dlang.org/changelog/2.083.0.html#reboot14246 Nvm, found the info in the issue tracker, thank you for the link. You're welcome. It's one of those