DEV Community

Discussion on: Modern C++ Isn't Scary

 
aminmansuri profile image
hidden_dude

Other languages just take care of this stuff.. you don't need to worry about it.
C++ is by default leaky.. its like a gun that unless you aim it perfectly will always shoot you in the foot.
Its possible to write good code, but there's a lot to take in to get it right.

I'd say if you don't declare your destructor virtual, you've made a dangerous coding error and the compiler should tell you so. But everything is on manual in C++ (except for the proliferation of memory leaks).