mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-10 04:51:17 +00:00
Switched memory to using shared nodes, and node_data to keep only naked node pointers, not shared nodes (to break the cycle, and we don't need weak pointers because their memory is guaranteed to exist, via 'memory')
This commit is contained in:
@@ -14,11 +14,11 @@ namespace YAML
|
||||
rhs.m_pMemory = m_pMemory;
|
||||
}
|
||||
|
||||
shared_node memory::create_node()
|
||||
node& memory::create_node()
|
||||
{
|
||||
shared_node_ref pRef(new node_ref);
|
||||
m_nodes.insert(pRef);
|
||||
return shared_node(new node(pRef));
|
||||
shared_node pNode(new node);
|
||||
m_nodes.insert(pNode);
|
||||
return *pNode;
|
||||
}
|
||||
|
||||
void memory::merge(const memory& rhs)
|
||||
|
Reference in New Issue
Block a user