In my C++ code, I make extensive use of STL containers to ensure I *never* have to dynamically allocate memory. Works great. Valgrind runs clean. Need a single object, return it. Need a bunch of objects, return a vector, map, set, etc.This codebase is the opposite. Everything is malloc() or new. The code I'm looking at right now is a simple vector of strings. The codebase does use std::vector. But instead of std::vector<std::string> they define it as a *pointer* to std::vector<char*>. Note even the vector itself is dynamically allocated. So they malloc() the memory for the vector (!?) and then malloc() each string.First thing I did was change malloc() to new and new[] across the codebase to ensure objects are created correctly. That solved a bunch of crashes.So much use of dynamic memory. Half the codebase is spent allocating memory, freeing it, checking to see if a function returned a nullptr or a pointer to an empty container.This whole thing needs to be re-written. #cpp