News for hackers. Stuff that matters.
Re:A Garbage Collector for C and C++ by rbehrends on Friday July 10, 2015 @10:22AM (#9864081)
> Properly executed RAII, at least in C++, should never break in the two cases you mention.

So, std::shared_ptr (or anything else that does reference counting) is not properly executed RAII?

> Debuggers too are usually well aware of out-of-scope objects, so I don't see the point here.

I wasn't talking about debuggers, but code that is enabled for debugging purposes. E.g. globally remembering the last N objects passed to a function.

My larger point is that either lifetime or reachability is off. You either have a resource that can still be accessed through a stale handle even though it's been deallocated or one that remains allocated past its intended lifetime.

There are no comments on this comment yet.