Bug #6628
closedcopy constructor for Xdm objects failure
100%
Description
Reported by user here: https://saxonica.plan.io/boards/4/topics/9826?r=9838#message-9838
The following C++ code snippet which attempts to use the XdmNode
copy constructor is failing:
...
root = new XdmNode(*child);
delete child;
XdmNode **children = root->getChildren();
The problem is the internal reference in the object handle pool for child
node object is shared in the new copy (i.e. root
), but this gets destroyed by the call delete child
and therefore will be garbage collected at some point in the GC cycle.
The only real workaround is to avoid using the copy constructor.
Updated by O'Neil Delpratt 14 days ago
- Status changed from New to Resolved
Bug fixed by creating. new object handle for the copied objects. This change has also bee n applied for across all copy constructors that classes that wrap Java objects.
Updated by O'Neil Delpratt 14 days ago
- % Done changed from 0 to 100
- Fix Committed on Branch trunk added
Added test case for XdmNode and SaxonProcessor copy constructor.
Please register to edit this issue