I hate class destructors with a burning passion

Imperatorn johan_forsberg_86 at hotmail.com
Mon Jun 7 10:04:32 UTC 2021


On Sunday, 6 June 2021 at 18:55:47 UTC, Guillaume Piolat wrote:
> On Sunday, 6 June 2021 at 14:19:39 UTC, Imperatorn wrote:
>> On Sunday, 6 June 2021 at 11:54:40 UTC, Mathias LANG wrote:
>>> Over the past few months, more than half of the critical bug 
>>> we've encountered which were not due to our own code are 
>>> related to destructors. Specifically, destructors being 
>>> invoked by the GC.
>>>
>>> [...]
>>
>> What would be some sensible solutions to these issues?
>
> Two first issues can be avoided by not letting the GC call 
> class destructors, and call them deterministically instead.

Do we have an issue or two for that? Sounds like an enhancement. 
Should/would it be configurable? Like -gcClassDtors=yes/no/auto 
kind of a thing or just kill it.


More information about the Digitalmars-d mailing list