Examples of things that require explicit clean up: -> Files -> Sockets -> Transactions
The C++ resource model can be applied to all resources, not just memory.
Garbage collection only "solves" memory management for you - often that's the least important resource that your program is managing.
I think you're right but wrong here : it may be the least important in a technical sense, but the sheer amount of developer productivity lost in manual memory management is very expensive (for both the mental resources of the programmer and the firm), and this makes automated memory management a key positive.
Honestly, my eyes glazed over to avoid traumatic memories of C++ and Windows DOM internals as I read the article. I have a LIFE since I moved to Java.
C++ destructors benefit is that you don't forget to call such constructs.
You can if all "destructors" take care of also closing the internal resources, thus initiating a cascade process of the object owned by them.
But you're right, this leaves the responsibility in the user's side.
> I would give an arm and a leg for RAII on the JVM.
At least they finally added the "using" concept.
In a few more versions maybe they get to add values.
Sometimes exact control is what you need. It is no use trying to stop any discussion on the subject.