On Wednesday, 1 September 2021 at 22:23:59 UTC, user1234 wrote:
I dont know why destructors are not virtual.

https://dlang.org/spec/class.html#destructors

"There can be only one destructor per class, the destructor does not have any parameters, and has no attributes. It is always virtual. "


I guess it is virtually virtual due to the rt_finalize implementation papering it over.

But you can write a destroy function to do this too by looking up the base class xdtor as well (I'm pretty sure anyway).

My point is really just that protoobject is almost certain to have exactly the same destructor situation as object....

Reply via email to