logoalt Hacker News

fauigerzigerkyesterday at 8:54 AM1 replyview on HN

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.


Replies

gpderettayesterday at 10:11 AM

RAII also composes.