When destructor can be virtual in c plus plus?

1 answer

Answer

1000794

2026-05-20 15:35

+ Follow

A class constructor initialises object member variables, ensuring the object is in a valid state from the point of instantiation. The destructor resets those same variables when the object falls from scope. Typically, the destructor is only required to release any memory allocated to any internal class pointers.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.