9 Jun
2003
9 Jun
'03
4:02 a.m.
Basically I'm having trouble understanding exactly how to use
shared_ptr . If I have a class:
GraphNode
{
public:
AddChild(shared_ptr<GraphNode> n)
{
m_Children.push_back(n);
shared_ptr<GraphNode> thisptr(this);
n->m_Parents.push_back(thisptr);
}
DeleteChild(shared_ptr<GraphNode> n);
private:
vector