S
shaun roe
This is perhaps more c++ than XML:
I have a main program which instantiates two classes which use Xerces.
Up until recently I followed the following philosophy in each class:
1) In constrcuctor, initialise XMLplatform utils and 'new' a
XercesDOMParser for use in the rest of the class.
2) In the destructor, 'delete' the parser pointer and call
XMLPlatformUtils::Terminate().
This worked fine for a while, but recently I'm getting erratic
crashes/hangs which may point to a memory allocation/release problem. In
particular, the program tends to hang in the destructors, right at the
end of the program when all the works been done. (the classes both go
out of scope at the same point, when the program terminates)
I'm now trying variations on terminating/not terminating the XMLPlatform
Utils, or deleting/not deleting the pointer.
Whats the magic recipe?
cheers
shaun
I have a main program which instantiates two classes which use Xerces.
Up until recently I followed the following philosophy in each class:
1) In constrcuctor, initialise XMLplatform utils and 'new' a
XercesDOMParser for use in the rest of the class.
2) In the destructor, 'delete' the parser pointer and call
XMLPlatformUtils::Terminate().
This worked fine for a while, but recently I'm getting erratic
crashes/hangs which may point to a memory allocation/release problem. In
particular, the program tends to hang in the destructors, right at the
end of the program when all the works been done. (the classes both go
out of scope at the same point, when the program terminates)
I'm now trying variations on terminating/not terminating the XMLPlatform
Utils, or deleting/not deleting the pointer.
Whats the magic recipe?
cheers
shaun