Jesse,
 
Thanks for the const char* advice, that takes care of my crash.
to fix the leak, would you recommend I change my original:
 
DOMDocument* ConstraintChecker::ParseDoc(const char *mem)
{
   MemBufInputSource *memBufIS = new MemBufInputSource((const XMLByte*)mem, strlen(mem), gMemBufId, false);
   XercesDOMParser *domParser  = new XercesDOMParser;
 
   domParser->parse(*memBufIS);
   return(domParser->getDocument());
}
into:
 
DOMDocument* ConstraintChecker::ParseDoc(const char *mem)
{
   MemBufInputSource *memBufIS = new MemBufInputSource((const XMLByte*)mem, strlen(mem), gMemBufId, false);
   XercesDOMParser *domParser  = new XercesDOMParser;
   domParser->parse(*memBufIS);
   DOMDocument *doc = domParser->getDocument();
 
   delete domParser;
   delete memBufIS;
 
   return(doc);
}
Sincerely
-- Jimmy
________________________________________________
The meek shall inherit the earth, but not the mineral rights.
- J. Paul Getty

Reply via email to