Earlier quoted context omitted.
I think the focus on smart pointers is a huge mistake. Code bases using shared_ptr inevitably will have cycles and memory leaks, and no one understands the graphs any more. Tree algorithms that are simple in literature get bloated and slow with shared_ptr. The only issue with pointers in C++, which C does not have , is that so many things are copied around by default if one is using classes. So the way to deal with t…
You actually think managing memory manually using new and delete is easier than dealing with occasional problems with leaking memory using shared_ptr? That seems pretty ridiculous to me.
As I wrote, the stdlib++ agrees. Read that code and reevaluate your view on whether it is ridiculous.
For other graphs, it depends on the specific application. I am not saying that shared_ptr is always wrong, but often it is.