Can anybody know how to use sqL notification service in C++ ? -----Original Message----- From: Kong Posh Bhat [mailto:[EMAIL PROTECTED] Sent: Friday, January 11, 2008 9:35 PM To: Alberto Massari Cc: [email protected] Subject: RE: Transferring nodes from one DOM tree to another ----- possible?
> -----Original Message----- > From: Alberto Massari [mailto:[EMAIL PROTECTED] > Sent: Friday, January 11, 2008 3:20 AM > To: Kong Posh Bhat > Cc: [email protected] > Subject: Re: Transferring nodes from one DOM tree to another ----- possible? > > In this case I need to have a look at the full source.... > > Alberto > > P.S. Please keep [email protected] in the CC list Hi, I have been able to reproduce the problem with a dummy class (that I have named CreateCoreDump). The listing for the class is provided below. In this class I am dynamically allocating an instance of the XercesDOMParser class. If I try to delete this in the destructor, core dump ensues. Here are the details of my execution environment: - gcc version 3.3.1 - Linux 2.4.20-31.9smp #1 SMP //////// Source code begin //////////////// #include <iostream> #include <stdexcept> #include <string> #include "xercesc/parsers/XercesDOMParser.hpp" using namespace std; XERCES_CPP_NAMESPACE_USE #define DST_BLOCK_SIZE 8192 //--------------------------------------------------- // //--------------------------------------------------- class CreateCoreDump { public: CreateCoreDump(const string& inputXMLFileName) throw (bad_alloc) { m_parser = new XercesDOMParser; try { m_parser->parse(inputXMLFileName.c_str()); } catch(...) { #ifdef DEBUG cerr << "Error in parsing file " << inputXMLFileName << " --- issuing exception\n"; delete m_parser; m_parser = NULL; throw bad_alloc(); #endif // DEBUG } DOMDocument* domPtr = m_parser->adoptDocument(); // // Do something useful here // } virtual ~CreateCoreDump() { if(m_parser) delete m_parser; // This is the statement that causes the core dump } protected: XercesDOMParser* m_parser; }; // ------------------------------------------------------------------------ --- // // main // // ------------------------------------------------------------------------ --- int main(int argC, char* argV[]) { // Check command line arguments. if (argC < 2) { cout << "usage: " << argV[1] << " <input XML file>\n";; XMLPlatformUtils::Terminate(); return 1; } // Initialize the XML4C2 system try { XMLPlatformUtils::Initialize(); } catch(const XMLException &toCatch) { XERCES_STD_QUALIFIER cerr << "Error during Xerces-c Initialization.\n" << " Exception message:" << XMLString::transcode(toCatch.getMessage()) << XERCES_STD_QUALIFIER endl; return 1; } CreateCoreDump ccd(argV[1]); // Call the termination method XMLPlatformUtils::Terminate(); return 0; } //////// Source code end //////////////// Vyapar Capital Market Partners LLC Disclaimer: This message contains confidential information and is intended only for the individual named. If you are not the named addressee and have received this message you should not disseminate, distribute or copy this email. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. 18 U.S.C. '2510 et. seq., makes it a federal offense punishable by a fine and up to 5 years incarceration, for the intentional interception, disclosure, dissemination or use of any wire, oral or electronic communication, knowing or having reason to know that the information was obtained through illegal interception. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the content of this message which arise as a result of e-transmission. If verification is required, please request a hard-copy version. Vyapar Capital Market Partners LLC does not accept time sensitive, action-oriented messages or transaction orders, including orders to purchase or sell securities, via e-mail. Vyapar reserves the right to monitor and review the content of all messages sent to or from this e-mail address, and may store messages sent to or from this e-mail address on the Vyapar e-mail system as part of Vyapar's US Patriot Act Compliance Program.
