Hacker News new | ask | show | jobs
by fauigerzigerk 125 days ago
But of course what you call "surprising" and "hidden" is also RAII's strength.

It allows library authors to take responsibility for cleaning up resources in exactly one place rather than forcing library users to insert a defer call in every single place the library is used.

1 comments

RAII also composes.