Re:Plywood: A New Cross-Platform Open Source C++ Framework
by uluyol on Tuesday May 26, 2020 @08:03PM
(#23317946)
This isn't a question of smart vs raw pointers, it's a question of pointer vs value. A std::vector<T> is considered good code in modern C++ and should often be preferred over a std::vector<std::unique_ptr<T>>.
[ Parent
| on HN ]
Re:Plywood: A New Cross-Platform Open Source C++ Framework
by h0l0cube on Tuesday May 26, 2020 @09:15PM
(#23318372)
> it's a question of pointer vs value
Yeah, the indirection I was referring to generalises to this.
Edit:
You might be saying that STL data structures could have been used by the author to alleviate the memory locality issue, but as noted in another thread, it's common to use custom STL implementations or use entirely custom memory management in performance critical applications, to reduce on memory allocation frequency, memory usage and/or fragmentation. Or maybe the author is just more 133t than thou.