3 ms·
Exactly. I've had endless arguments about that exact point with shared_ptr. IMHO, shared_ptr should be used as a last resort, where ownership of something truly
by zelos 8y ago
Exactly. I've had endless arguments about that exact point with shared_ptr. IMHO, shared_ptr should be used as a last resort, where ownership of something truly is shared. Use unique_ptr for everything else.
Just using it for convenience for things like callbacks will lead to weird, hard-to-debug bugs in more complex code.