M
Meal
Hi,
I wrote a simple codes to test this method, but it turns out to be
memory access violation.
The codes is:
int updateRecord(const DOMNode* node, const XMLCh*
timeStampString)
{
if(!timeStampString)
return 0;
XMLDateTime timeStamp(timeStampString);
timeStamp.parseDateTime();
timeStamp_ = timeStamp;
return 0;
}
Here timeStamp_ is declared as XMLDateTime member, and is initialized
by default.
When the object is destroyed in the main function, I get memory access
violation in the stack:
xerces-c_2_7D.dll!xercesc_2_7::XMLDateTime::~XMLDateTime() Line 425
+ 0x15 C++
DomX.exe!LatestRecord::~LatestRecord() Line 41 + 0x15 C++
DomX.exe!main() Line 141 + 0x1c C++
Exactly, it's in the destructor of XMLDateTime:
XMLDateTime::~XMLDateTime()
{
if (fBuffer)
fMemoryManager->deallocate(fBuffer);//delete[] fBuffer;
}
Does anybody know why? The documentation of Xerces is poor.
I wrote a simple codes to test this method, but it turns out to be
memory access violation.
The codes is:
int updateRecord(const DOMNode* node, const XMLCh*
timeStampString)
{
if(!timeStampString)
return 0;
XMLDateTime timeStamp(timeStampString);
timeStamp.parseDateTime();
timeStamp_ = timeStamp;
return 0;
}
Here timeStamp_ is declared as XMLDateTime member, and is initialized
by default.
When the object is destroyed in the main function, I get memory access
violation in the stack:
xerces-c_2_7D.dll!xercesc_2_7::XMLDateTime::~XMLDateTime() Line 425
+ 0x15 C++
DomX.exe!LatestRecord::~LatestRecord() Line 41 + 0x15 C++
DomX.exe!main() Line 141 + 0x1c C++
Exactly, it's in the destructor of XMLDateTime:
XMLDateTime::~XMLDateTime()
{
if (fBuffer)
fMemoryManager->deallocate(fBuffer);//delete[] fBuffer;
}
Does anybody know why? The documentation of Xerces is poor.