|
From: <ar...@ia...> - 2004-03-08 20:18:05
|
cppdom::NodeLists seem to crash when they go out of scope. I am running Win32 Visual
Studio 7.0 with cppdom 0.3.1 built from source, and the
following code generates a crash and stack trace that ends in std::vector::~vector :
ContextPtr context( new Context );
Document doc( context );
doc.loadFile( "myFile" );
NodePtr tag = doc.getChild( "tag" );
{
NodeList subtags = tag->getChildren( "subtag" );
} <-- stack trace jumps from here into STL and ends in std::vector::~vector
myFile.xml
----------
<tag>
<subtag/>
<subtag/>
</tag>
It seems like the NodeList goes out of scope and the smart pointers to the nodes it
contains get deleted prematurely. I should also note that
calling getChildren() without any tags does not crash, probably because a new vector is
never generated.
Any help would be appreciated,
Andres Reinot
ar...@vr...
|