Re:Chromium project finds that 70% of security defects are m...
by cryptofistMonk on Sunday May 24, 2020 @01:00AM
(#23289238)
Containers and smart pointers will pretty much do the trick. There's really no need for manual memory management anymore, can't remember the last time I used new/delete. Only problem is most large C++ apps, Chromium included, are older than a lot of the language features that have made C++ much safer these days.
[ Parent
| on HN ]
Re:Chromium project finds that 70% of security defects are m...
by zetafunction on Sunday May 24, 2020 @07:39AM
(#23290834)
Even though Chromium was started before C++11 was standardized, it still used a smart pointer type with move semantics that was very similar to std::unique_ptr for lifetime management.
However, while lifetime management with smart pointers is certainly important, it doesn't help with non-owning pointers between objects.