What is the relation between C storage-class and C++ destructor

  c++

I am very new to C/C++ programming.

  • Storage class in C signifies the visibility and life cycle of a variable.

  • In C++, Constructor and Destructor are used to initialize & release-resources the object occupied.

Yes, constructor helps reducing much of repetitive code but destructors are used to release and/or free resources (once an object goes out of scope).

Are these concepts coupled in some way in their implementation?

Source: Windows Questions C++

LEAVE A COMMENT