did you check the header of that cpp? they are storing it in a shared_ptr: shared_ptr = referenced counted pointer = RAII
they should have used make_shared, but it is still safe
Which isn't exception safe, as any good C++ developer would know.
"Google Does Bad Thing" is not quite equivalent to "C++ Is Bad Language"
Indeed, it is even one of my favourite languages, but contradicts the OP's point of every industry C++ codebase has banned new and delete.
The Google C++ style guide alone is sufficient evidence to conclude that Google doesn't know how to do C++ properly.
Yet they are one of the major contributors to ISO C++ and LLVM, what gives?
It just means that they still derive value from C++. But I, for one, am very glad that they're not a dominant force in the ISO standard committee.
https://android.googlesource.com/platform/frameworks/base/+/...