3 ms·
It is the foundation of C++. Even in pre-modern destructors were the heart even if we didn't use them as much as we do now with modern C++.
by bluGill 5y ago
It is the foundation of C++. Even in pre-modern destructors were the heart even if we didn't use them as much as we do now with modern C++.
- ncmncm 5y agoWe have always relied on destructors fully as much as we do now. What is new is that we hardly ever need to write one, anymore, or even to declare one. That is a consequence of a more mature standard library. I wonder now whether Ada auto-generates destructors for types with a member that defines one. And whether its standard library is such as to make a need to code them yourself vanishingly rare.