[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-c-dev
Subject:    RE: Static build on win32
From:       "Murphy, James" <James.Murphy () excelergy ! com>
Date:       2001-08-30 17:01:24
[Download RAW message or body]

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

LOL...a "free-for-all" is what we need!  I should look but does xerces use
anything except new?
Jim

> 
> 
> -----Original Message-----
> From: Murphy, James [mailto:James.Murphy@excelergy.com]
> Sent: Thursday, August 30, 2001 9:31 AM
> To: 'xerces-c-dev@xml.apache.org'
> Subject: RE: Static build on win32
> 
> 
> Read "james@tri-tech.com"'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:Peter.Armistead@softwareag.com]
> > Sent: Thursday, August 30, 2001 10:18 AM
> > To: 'xerces-c-dev@xml.apache.org'
> > 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: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic