6 ms·
It shouldn't be the standard way of managing memory; it should be a part of the toolkit. In order, it should look like: 1) Stack allocation 2) std::unique_ptr
by yuushi 13y ago
It shouldn't be the standard way of managing memory; it should be a part of the toolkit. In order, it should look like:
1) Stack allocation
2) std::unique_ptr
3) std::shared_ptr
You should be properly thinking about onwership semantics, and unique_ptr should be the default, not shared_ptr.