3 ms·
>C++, in std::shared_ptr<T> In C++, every shared_ptr also allocates a separate "control block" in the heap, so performance is even worse than that.
by kgeist 4y ago
>C++, in std::shared_ptr<T>
In C++, every shared_ptr also allocates a separate "control block" in the heap, so performance is even worse than that.
- int_19h 4y agostd::shared_ptr is not meant to be used as the default memory management technique, hence why it's not that important. But it does mean that C++ is not a good example here. I would argue that Rust isn't, either, since ARC is also an occasional opt-in there rather than the default.