Fix emplace_back(new) calls
Doing v.emplace_back(new Type) on a std::vector<std::unique_ptr<Type>> is not exception safe. This is because it cause a leak of passed pointer if emplace_back would throw exception before emplacement (e.g. not enough memory to add a new element). PiperOrigin-RevId: 208095516
Loading
Please sign in to comment