> Hi Alberto, > > According to my debuggin on VC7/WinXP, delete > aTranscoder will invoke the global delete operator, > which happen to work fine simply because the current > memory manager implementation happen to use global new > operator as well. > > If the memory manager implementation changed to use > malloc instead, that code will crash.
This is not the behavior I see with this small program, using VC++ 6, 7.0, and 7.1: #include <xercesc/util/PlatformUtils.hpp> #include <xercesc/util/TransService.hpp> int main() { using xercesc::XMLPlatformUtils; using xercesc::XMLTransService; using xercesc::XMLTranscoder; XMLPlatformUtils::Initialize(); XMLTransService* const theService = XMLPlatformUtils::fgTransService; XMLTransService::Codes theCode; XMLTranscoder* const theTranscoder = theService->makeNewTranscoderFor( "utf-8", theCode, 1024); delete theTranscoder; return 0; } The delete expression: delete theTranscoder; results in the following calls: xercesc_2_6::XMLUTF8Transcoder::~XMLUTF8Transcoder() xercesc_2_6::XMemory::operator delete() xercesc_2_6::MemoryManagerImpl::deallocate() which is exactly why I would expect, and global operator delete is called within MemoryManagerImpl::deallocate(), which is correct. If this is not what you're seeing, there is something wrong with your environment. Dave --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]