3 ms·
in my experience, it's almost inevitable that you end up calling some code you don't control that returns raw pointers. better hope you have access to the sourc
by leetcrew 5y ago
in my experience, it's almost inevitable that you end up calling some code you don't control that returns raw pointers. better hope you have access to the source or at least some good docs :)
- maccard 5y agoAgreed. That problem existed even before unique_ptr though; there are still some APIs that I use that hand you back pointers that you may or may not need to manage yourself. If you do need to, then unique_ptr + custom deleter is the way to go!