Mikołaj Zalewski wrote: > A problem with this patch is that the user may have an IXMLDOMNode * > reference to the attribute node being removed. The xmlFreeProp will free > the xmlnode so accessing the IXMLDOMNode could result in memory > corruption. Under MSXML it's possible to access such node and even > reconnect it e.g. to a different documents (at least I seem to remember > such a thing for element nodes). > I don't think supporting it is possible with our current reference > counting only for the whole document. I was thinking about also keeping > reference counts for each connected component and each node. The > connected component count could be used to determine if the node can be > freed in such a situation and the node count could be used to update the > connected component counts if the tree gets split. But so far I haven't > written any code (Another possibility is to keep in each node the > refcount of the whole subtree starting in this node. This is more > elegant but it would take a linear time with respect to the tree height > to update the refcount). > > Mikołaj Zalewski > > Thanks for pointing this out. Ill write some tests, and retry again shortly.
Alistair Leslie-Hughes