3 ms·
> You should almost always be using unique_ptr or shared_ptr I really wish there was a thread unsafe version of shared pointers, without atomics overhead, in t
by rightbyte 3y ago
> You should almost always be using unique_ptr or shared_ptr
I really wish there was a thread unsafe version of shared pointers, without atomics overhead, in the standard. Maybe without weak pointers.
- deleted 3y ago[deleted]
- lacker 3y agoIf there's one thing C++ needs, it's more slightly-different varieties of smart pointers in the standard. ;-) What exactly would you use these for? I find that usually I can get away with unique_ptr for the sort of object that I have many of where pointer performance matters.
- rightbyte 3y agoSome sort of problems where you throw trees around. Almost interpreter like programs, where trees are arbitrarily stored on different places. And where you for some reason don't want a proper GC ...