Hi,
The following code crashes on my system. Note if I do the same operation in
the My_Class constructor ( ... xNode->getNodeType() ), everything is fine.
Looks like the copy constructor is not doing a "deep" copy? We're doing the
same thing on DOM_NodeList as well, seems everything works fine. Can you let
me know if I'm implementing in the right way? Thanks!
class My_Class {
public:
My_Class (const NodeRefList theSource) {
...
nodeList = theSource;
/* check the nodeList.getLength() > 0 */
XalanNode *xNode = nodeList.item(0);
xNode->getNodeType(); <----- everything is
fine here
}
~My_Class ();
My_Function() {
...
/* check the nodeList.getLength() > 0 */
XalanNode *xNode = nodeList.item(0);
xNode->getNodeType(); <----- crashes here
}
private:
NodeRefList nodeList;
};
- Crystal