I've seen crashes like this when :
1. I had had forgotten about the Janitor and deleted the parser instance previously in the code.
2. When I had deleted something the parser owned, and thus when the parser was deleted it tried to re-delete whatever I had already done.
3. I am used a different memory model in my app from Xerces (Runtime in a DLL) as the Janitor then uses it's runtime library to delete an object created by a different runtime library.
Cheers,
BerinMilan Tomic wrote:
I had this code:
try {
//more code here... XercesDOMParser * parser = new XercesDOMParser;
Janitor<XercesDOMParser> j_parser(parser);
//more code here...
//my app crashes here
} catch (...) {
//never come here
}
//never come here
My app crashes (not allways) before catch block. Am I using Janitor in a wrong way? Is there some known bug/issue with Janitor? I'm using Xerces 2.4/VC++6/WinXP.
Best regards, Milan
