News for hackers. Stuff that matters.
Re:Show HN: A pure reference counting GC in Go by wildmusings on Wednesday January 15, 2020 @11:24AM (#22055570)
Even in a reference counted or RAII environment, you still have to think about this. Your C++ function might do something with a file (or other resource) and then a bunch of other stuff, or vice-versa. If you care about holding that resource open for as little time as possible, you need to consciously introduce a new anonymous scope where the resource object and operations are contained (or, of course, you could break it out into another function).

There are no comments on this comment yet.