Replaced char* name in profile by a std::string to reduce memleaks