4 ms·
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 ne
by cryptofistMonk 6y ago
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.
- zetafunction 6y agoEven 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.