Title: Deleting char* returned from DOMString.transcode() in VC++ 6.0
In addition to Jesse's reply to this message, you should use:
    delete [] Name;
 
Dave Connet

-----Original Message-----
From: Gary Marsh [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 19, 2001 12:29 PM
To: [EMAIL PROTECTED]
Subject: RE: Deleting char* returned from DOMString.transcode() in VC++ 6.0

Jesse;
 
Thanks for the tip.  I am linking to the xerces_c_1D.lib and I have the xerces_c_1_4D.dll in my path.  Upon recompile/link of my
program I got the following error message during the run:
 
    Debug Assertion Failed!
 
    Program: D:\MyDevArea\XGateWayTest\Debug\XGateWayTest.exe
    File: dbgheap.c
    Line: 1044
   
    Expression: _CrtIsValidHeapPointer(pUserData)
                        .
                        .
                        .
 
the code that generated this is the following:
 
       
        Name = (char*)item.getNodeName().transcode();
 
        nodeName.assign( Name );
 
        delete Name;
 
//        DOMString::transcodeDelete(Name);
 

The moment the delete Name; line is executed the above error is generated.
 
If I comment the delete Name; line and uncomment the DOMString::transcodeDelete(Name); line
which I added locally to the Xerces library, then it runs fine.
 
Gary
 
-----Original Message-----
From: Jesse Pelton [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 19, 2001 11:50 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Deleting char* returned from DOMString.transcode() in VC++ 6.0

Reply via email to