Supun Kamburugamuva wrote:
Hi All,

As far as I can see there is a problem with ref counts based cloning
that is very hard to solve. Let's say we clone a node 5 times and we
have six node trees. The cloned node trees will be pointing to the
original node tree for some structures like namespaces. When we needs
to modify something in a cloned tree we know that we are pointing to
another structure in the original tree and we can take appropriate
actions like creating a new structure (copy on write).

But Interesting thing is what happens when we need to change the
original node tree.

With ref-counts, you cannot afford to change. It becomes a 'read-only' tree.

Then we will have to create 5 structures for the
cloned trees and attach them to those trees.

5 copies! Why on earth we want to do that? ;)

Samisa...


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to