3 ms·
It feels like that goes with your no exceptions policy. If you use exceptions (which is a different argument), then the return point is not necessarily clear.
by MereInterest 8y ago
It feels like that goes with your no exceptions policy. If you use exceptions (which is a different argument), then the return point is not necessarily clear. A unique_ptr makes sure that the object is correctly deleted, even in the case of error conditions.
The compiler knows where the lifetime ends. Why do the computer's work for it?