Re:So We've Got a Memory Leak
by rcxdude on Monday May 13, 2024 @04:04AM
(#40340828)
Defer and context managers are a pale approximation of RAII. They are constrained to lexical scope, as opposed to RAII which works with object lifetimes. And it's the latter case which is much more error prone than 'oops, I forgot to close a file I opened this function'.
[ Parent
| on HN ]
There are no comments on this comment yet.