D's Destructors are What Scott Meyers Warned Us About

12345swordy alexanderheistermann at gmail.com
Wed May 23 14:28:22 UTC 2018


On Wednesday, 23 May 2018 at 03:45:39 UTC, Manu wrote:
> On 22 May 2018 at 19:39, 12345swordy via Digitalmars-d 
> <digitalmars-d at puremagic.com> wrote:
>> On Wednesday, 23 May 2018 at 02:15:25 UTC, Manu wrote:
>>>
>>> It should recurse the ClassInfo calling the dtors there to 
>>> perform a full virtual destruction.
>>
>>
>> Why? That seems restrictive as there is possibility that the 
>> parent class have an empty destruction with no attributes 
>> which your suggestion to be attribute unfriendly.(Unless the 
>> attributes are determine at compile time)
>
> ... what?

Why? That seems restrictive as there is possibility that the 
parent class have an empty destruction with no attributes which 
causes your classInstance.~this() suggestion to be attribute 
unfriendly.(Unless the parent class attributes are determine at 
compile time)

*There I fixed it! Really wish this is a proper web forum.


More information about the Digitalmars-d mailing list