private final class destructors

Jonathan M Davis jmdavisprog at gmail.com
Thu Aug 19 14:44:39 PDT 2010


On Thursday, August 19, 2010 08:23:42 Simen kjaeraas wrote:
> A destructor is always final, and private destructors make no sense,
> so I would say the attributes should not be there.

Actually, I could see private destructors making at least some sense. Obviously, 
the runtime needs to be able to call them, but I could see someone wanting to 
make it so that a destructor could not be explicitly called by the programmer. 
I'm not sure that that's ultimately all that useful, but I could see private 
destructors working that way.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list