Read the FAQ -- you are mixing runtime libraries.  You must use the
multithreaded DLL runtimes with Xerces.

Dave



                                                                                       
                                   
                    "Rudolf                                                            
                                   
                    Wiener"              To:     <[EMAIL PROTECTED]>         
                                   
                    <rudolf@wiene        cc:     (bcc: David N Bertoni/CAM/Lotus)      
                                   
                    r.at>                Subject:     can't delete char-ptr from 
DOMString.transcode()                    
                                                                                       
                                   
                    04/01/2001                                                         
                                   
                    05:55 AM                                                           
                                   
                    Please                                                             
                                   
                    respond to                                                         
                                   
                    xerces-c-dev                                                       
                                   
                                                                                       
                                   
                                                                                       
                                   



I am using Xerces 1.4.0 under Win2K with VC6.

The following code snippet asserts in debug mode:
           char* p = myNode.getNodeName().transcode();
           delete p;
The code is inside a DLL which is being called from an EXE.

The reason for the assert is, I believe, the fact that Xerces was
first initialized in a different address space. VC's debug
runtime checks whether memory to be deleted is from the _local_
heap. If not, it asserts.

Both the EXE and the DLL use Xerces. The EXE builds
a DOM and serializes it into a string. Then it calls the DLL
which receives the XML string as a parameter and parses this to
build a DOM again.

As the DLL might be used by other programs as well (which won't
use Xerces) I initialize the platform utilities in both the EXE
and the DLL.

Is there a way to load a second, local, instance of Xerces so
I could avoid this problem with delete?

Regards
Rudi

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to