Not sure about the best way to bring this up, but isn't the buffer returned
by transcode() allocated with new[]?  If so, the proposal is flawed, since
it is using free() and not delete[]...  If this type of "solution" is chosen
to be implemented, maybe it would be best to localize the solution a bit
(perhaps a DOMString::deleteTranscodedData( char* pDataToDelete ) or
something along those lines), instead of providing a "free-for-all" (pun
intended) function...


-----Original Message-----
From: Murphy, James [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 30, 2001 9:31 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Static build on win32


Read "[EMAIL PROTECTED]"'s bug submission [1].  He is proposing 

void XMLPlatformUtils::Free(void *p) 

That can be called to free memory allocated by Xerces (perhaps from a
statically linked CRT).  Methinks this would solve your problem.  Add on
yourself or wait for that change in the code base.

[1] http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3347

Bug excerpt:

+ Occaisionally, there is a need to create an application that is statically
+ linked to the runtime.  Rather than building a custom version of Xerces
which is
+ statically linked to the runtime, I propose that a simple function be
added (to
+ XMLPlatformUtils?) to release memory.
+ 
+ I have implemented a version of this for my project, and found that it
works
+ very well.
+ 
+ void XMLPlatformUtils::Free(void *p) 
+ {
+   free(p); 
+ }


> -----Original Message-----
> From: Armistead, Peter [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 30, 2001 10:18 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Static build on win32
> 
> 
> 
> > What do you mean by "component"?
> 
> In this case, anything that has a statically linked CRT.
> 
> > Is Xerces a "component" ?
> 
> Yes.
> 
> > If so, how can I ensure that the strings are freed inside Xerces ?
> 
> You would have to create a release function inside Xerces to do this I
> imagine.
> 
> > Is there another way to translate between strings beside 
> transcode() ?
> 
> I have no idea, I don't know anything about the inner 
> workings of Xerces I'm
> afraid. We use the standard DLL for Win32 and our own port for Win64.
> 
> You will have to ask someone who knows!
> 
> Peter
> 
> ---------------------------------------------------------------------
> 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]

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

Reply via email to