Re:Reference count, don't garbage collect
by mypalmike on Saturday July 30, 2022 @03:39AM
(#32285046)
Yeah you can't apply C++ style resource management (specifically, calling close() in destructors or expecting cascading destructors to trigger in sequence) to GC languages. Object lifetime in a GC languages does not generally align with desired resource lifetimes. You have to be explicit. This often means creating your own public close methods when wrapping a resource in a class.
[ Parent
| on HN ]
There are no comments on this comment yet.