XMLDateTime::operator= memory access violation?

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top