// pointer to new std::string object -> memory is not garbage-collected std::string* strPtr = new std::string; // pointer to System::String object -> memory is garbage-collected System::String^ manStr = gcnew System::String;
// pointer to new std::string object -> memory is not garbage-collected std::string* strPtr = new std::string; // pointer to System::String object -> memory is garbage-collected System::String^ manStr = gcnew System::String;