News for hackers. Stuff that matters.
Re:A Defer Mechanism for C by hedora on Monday December 14, 2020 @10:58AM (#25418997)
Yes. On reflection, or on ramping up new developers, I think you’ll find that it is unnecessarily difficult to reason about object lifetimes.

There’s a good chance that most of the shared_ptr’s can be replaced by unique_ptr, which has less runtime overhead. More importantly, it documents the intent of the programmer regarding ownership semantics, and the timespan during which the object should be remain valid.

There are no comments on this comment yet.