DEV Community

Discussion on: Modern C++ Isn't Scary

Collapse
 
aminmansuri profile image
hidden_dude • Edited

The problem isn't with malloc and free (or new and delete in the case of C++).. but with things like implict object creating when returning values the wrong way, or by improperly setting up copy constructors and things like that. Or the need to make destructors virtual if you use inheritance (don't do it? memory leak)

If it only was a matter of new/delete then it would be simple, like C is.
C++ is unwieldy.. too many rules. There are better, more productive languages these days.