4 ms·
Agreed. This is a very odd rant against smart pointers that is essentially a rant against the strawman. The most relevant line is this: "to most other language
by Remnant44 3y ago
Agreed. This is a very odd rant against smart pointers that is essentially a rant against the strawman.
The most relevant line is this: "to most other languages you are simply passing the address of a buffer". That's true! And so for the love of all that's holy, don't transfer ownership. Simply pass a (non-owning, defined-lifetime) pointer to your data to the relevant dependency.
Have asynchronous issues? Need to extend lifetime sometimes? Well, yeah, unique_ptr is not going to help you there. It's not magic.