| let's be serious, chromium and firefox are more 90s style codebases than 2010s. There's thousands of raw malloc calls when I grep in the chromium source tree, and let's not even start talking about firefox where in the same file you've got : - raw mallocs : https://github.com/mozilla/gecko/blob/central/dom/plugins/ip... - new / delete : https://github.com/mozilla/gecko/blob/central/dom/plugins/ip... - "whatever.Allocate<T>" : https://github.com/mozilla/gecko/blob/central/dom/plugins/ip... and that's not limited to a single file... look at this : https://github.com/mozilla/gecko/blob/3e6d6e013400af38f85ceb...
- some malloc and new, again - you also get some unique_ptr (because "modern" m'see) : https://github.com/mozilla/gecko/blob/3e6d6e013400af38f85ceb... - moz_xmalloc because why not ? https://github.com/mozilla/gecko/blob/3e6d6e013400af38f85ceb... - oh and did you know about our own custom reference counting pointer ? https://github.com/mozilla/gecko/blob/3e6d6e013400af38f85ceb... etc etc... when you've got 35 different ways to allocate objects used willy-nilly of course things go wrong. Most modern codebases only ever use automatic storage, and unique / shared_ptr. |