The first thing to check is that you're doing:

   delete [] theString;

rather than:

   delete theString;

If you're on Windows, you need to make sure that all libraries are using
the same heap manager, which means that they all use the same version of
the run-time libraries.  You must use the Multithread DLL run-times, not
the static ones.  You should use the debug run-time for debug builds and
the release run-time for release builds.

This is both a FAQ and a constant question on the list.  Search the
archives for other ways to avoid this problem by having the string
transcoded into your own buffer.

Dave



                                                                                       
                       
                      Tobias McNulty                                                   
                       
                      <tmcnulty@datade         To:      [EMAIL PROTECTED]    
                       
                      sk.com>                  cc:      John Capehart 
<[EMAIL PROTECTED]>,               
                                               [EMAIL PROTECTED], (bcc: David N 
Bertoni/CAM/Lotus)       
                      12/28/2001 02:00         Subject: DOMString                      
                       
                      PM                                                               
                       
                      Please respond                                                   
                       
                      to xerces-c-dev                                                  
                       
                                                                                       
                       
                                                                                       
                       



Is there anything special about the char * returned by
DOMString::transcode?  I am using DOMString in JNI (which is probably
part of the problem) -- but I am getting some fairly abnormal
behavior.  I am wondering if there is anything in particular I have
to do to dispose of the pointer returned by the above mentioned
function.

My applet terminates unexpectedly when I call delete myDomString;.
The error is like so:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0xf586689
Function name=std::bad_exception::what
Library=C:\WINNT\system32\ddjni.dll
Source file = M:\pro 7 builds\MSL\MSL_C\MSL_Common\Src\alloc.c : 807

Deletion of other locally-allocated pointers works fine.

Any ideas?

Thanks,

Toby
--
Tobias McNulty
Data Description, Inc.
840 Hanshaw Road, Suite 9
Ithaca, NY 14850
Phone: (607) 257-1000
E-mail: [EMAIL PROTECTED]
Web: www.datadesk.com

---------------------------------------------------------------------
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