I'm used to allocate shared pointer this way:
std::shared_ptr<Person> ptr = std::make_shared<Person>("Name", 27);
As I saw in other project, they allocate the pointer in a different way, and I want to understand the memory management behind each one.
1. std::shared_ptr<Person> ptr(new Person("Name", 27));
2. std::shared_ptr<Person> ptr = std::shared_ptr<Person>(new Person("Name", 27));
3. std::shared_ptr<Person> ptr = std::make_shared<Person>("Name", 27);
All of these options manage their memory without needed to de delete them manually ?