3 ms·
"This ensures correct cleanup and avoids leaking memory." Although shared_ptr does open you up to a whole new class of bugs, with circular references causing m
by zelos 8y ago
"This ensures correct cleanup and avoids leaking memory."
Although shared_ptr does open you up to a whole new class of bugs, with circular references causing memory leaks and object lifetimes being harder to reason about, especially in a multi-threaded environment.
I agree in general, though, things are a lot better.