A class has a non-trivial destructor if it either has an explicitly defined destructor, or if it has a member object or a base class that has a non-trivial destructor .19 Kas 2011
Read moreWhat are the types of destructors?
Destructors cannot be declared const , volatile , const volatile or static . A destructor can be declared virtual or pure virtual . If no user-defined destructor exists for a class and one is needed, the compiler implicitly declares a destructor.
Read moreHow many types of destructor are there?
There has to be only one Destructor in a class . A Destructor has no return type and no parameters. If we do specify a destructor in class then, the compiler creates a default destructor.
Read moreWhat is trivial destructor?
Trivial destructor The destructor for class T is trivial if all of the following is true: The destructor is not user-provided (meaning, it is either implicitly declared, or explicitly defined as defaulted on its first declaration) The destructor is not virtual (that is, the base class destructor is not virtual)
Read more