Can I call destructor in constructor C++?

When you throw from the constructor, it will call the destructor of any object constructed so far : the member variables and the inherited classes (section 15.2/2). If you call the destructor manually, their destructor will be also called (section 12.4/8).

Sizin İçin Seçtik  Are Awesome miners free?

Leave a Reply

Your email address will not be published. Required fields are marked *