Pattern: Class instance allocated with malloc()
Issue: -
Memory for class instance allocated with malloc()
, but class contains std::string
. This is unsafe, since no constructor is called and class members remain uninitialized. Consider using new
instead.