RAII is memory management; C++ automatically calling certian functions for you is a convenience to make things less tedious, just as C handles function calls and the stack, or how malloc/free actually do the hard work for you. There is a great benefit to reducing the amount of noise that the programmer has to deal with. Just becuase some people don't know how to use a tool effectively, that doesn't mean that the tool is inherently bad.
I go a step further and argue that manual resource management as a regular practice often leads to shittier code.
Not always and everyone hacks things together sometimes because it is simpler. But most of the time, the risk of fucking it up isn't worth it. It's not just about writing it correct once. It's about a conversation you're having with anyone else who might contribute to the project, including your past self and your future self. And your future self who's tired at 2am and you're just trying to push out a fix and be done with it.
And little resource leaks can stick around as vulnerabilities for years.
Everyone makes mistakes. It's not a matter of being a super badass low level programmer. Everyone, everyone fucks up. And once a good semi-automated solution for a resource management problem is found, almost always those solutions are better, amortized over your time and effort, than regularly doing a more careful, more precise job by hand. Doing the job by hand isn't ever 100% perfect, and just a few fuckups wipe away any efficiency gains you get by doing it by hand.
I was load testing something for work the other day and I learned firsthand why db connection pools default to low numbers like 8 and 32. It's because apparently database connections for things like postgres or mysql can get pretty fucking big. Especially postgres.
Right now we often tune the sizes of these connection pools by hand. Automated approaches are slightly better and slightly more wasteful of the immediate resource you're talking about. But they save resources over time.
I've worked as a software dev for smaller companies where I had to write the software
and deploy it, and managing resource settings is a huge, detailed job. It's way more expensive of my time to see someone (often me) tried to implement something more manually and realize that they fucked up and we all would've been better off using a dumber, less nuanced, automated approach to allocation and leave it tunable to whoever is deploying it.
Though nowadays I'm at a company with a dedicated infra guy and I don't think he knows how to program, so that kinda annoys the shit out of me. I'm doing his job a lot. When I was doing the infra stuff, I can look at the code to see what it's doing. I don't think he can.
Jeets though, what are you gonna do?