Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
MetaCosm
· 13y ago · 0 comments
I think the biggest fans of RAII are those who use it more academically -- in real life it is brittle and scopes are tricky. It is also just an idiom as compared to a compiler feature. And, IMHO, RAII tends to play poorly with others.
Comments
[–]
papaf
13y ago
RAII is of great pratical use and is not just about memory management. My current favourite use of RAII is QMutexLocker:
https://qt-project.org/doc/qt-5.0/qtcore/qmutexlocker.html#d...