adplus-dvertising
frame-decoration

Question

When is it advised to have user defined destructor?

a.

When class contains some pointer to memory allocated in class

b.

When a class contains static variables

c.

When a class contains static functions

d.

When a class is inheriting another class only

Answer: (a).When class contains some pointer to memory allocated in class

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. When is it advised to have user defined destructor?