Samisa, I think that is what the ref counts protect us against. In my app, where I do a shallow copy of the tree including the ref counted attributes, the original tree is released when the response message is freed via the adb classes. But the attributes are still present, as their ref counts were two and so were not released when they were decremented. The same should be true of the namespaces, provided they are re-declared on the detached node when it and its subtree are detached.
I have a test case with attributes having namespaces, as you may have inferred from the issue I wrote against the adb classes. I've coded a fix to axiom_node_detach to re-declare the namespaces when the node is detached. I don't expect to be able to test the code until this evening, but when I do you will be able to review the diff. Regards, Bill -----Original Message----- From: Samisa Abeysinghe [mailto:[EMAIL PROTECTED] Sent: Friday, February 15, 2008 7:41 AM To: Apache AXIS C Developers List Subject: Re: Issue in using 'detach' for cloning [EMAIL PROTECTED] wrote: > Samisa, I think what Kasun was saying is that detach, if it did not lose the > namespace references for the attributes, does work for him. When he attaches > the detached tree into a new larger tree, the detached tree needs to keep > valid namespace references for all of its nodes, even when the parent node, > Node A, does not already refer to those same namespaces. > > I presume, as well, if he needs to include the detached subtree into several > trees, a shallow copy works, as it preserves the information. > But he has to make sure that he do not release the original tree, till he is done using the detached sub-tree. Samisa... --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]