3 ms·
Most (all?) of these cannot cope with trees of objects, plus that they leave the responsibility of destructing to the user of the object. So they are just as ug
by strictfp 14y ago
Most (all?) of these cannot cope with trees of objects, plus that they leave the responsibility of destructing to the user of the object. So they are just as ugly as external locking. Problem is that very few people understand this, so they implement "using" and feel content. I would give an arm and a leg for RAII on the JVM.
- pjmlp 14y ago> Most (all?) of these cannot cope with trees of objects 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.