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 |
- MemBufInputSource with CString Jimmy Yu
- RE: MemBufInputSource with CString Jesse Pelton
- Re: MemBufInputSource with CString Jimmy Yu
- Re: MemBufInputSource with CString jiang lei
- RE: MemBufInputSource with CString Jesse Pelton
- Re: MemBufInputSource with CString Jimmy Yu
- RE: MemBufInputSource with CString Chaudhuri, Hiran
- RE: MemBufInputSource with CString Alberto Massari
- RE: MemBufInputSource with CString Chaudhuri, Hiran
- Re: MemBufInputSource with CString jiang lei
- RE: MemBufInputSource with CString Chaudhuri, Hiran