xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Heinz" <AHe...@exstream.com>
Subject RE: DOMWriter Questions
Date Fri, 09 Apr 2004 16:20:56 GMT
XMLString::transcode(1 arg) always returns a string that you should dispose of with XMLString::release.
 Look around for an XStr or StrX class in the examples.  You'll use a _X() macro that creates
an XStr object on the stack, then that object holds the heap-allocated results from XMLString::transcode
until it falls off the stack, at which point it cleans up for you.  It's nice enough for somecall(_X("foo")),
etc.

Adam Heinz
Senior Software Developer
Exstream Software

-----Original Message-----
From: Monica Lau [mailto:mllau2004@yahoo.com]
Sent: Friday, April 09, 2004 11:15 AM
To: xerces-c-dev@xml.apache.org
Subject: RE: DOMWriter Questions

Hi,

Thanks for this important piece of information.  I
believe all the samples that I've seen so far use 
someCall(XMLString::transcode(...))

What about the "getDOMImplementation(...)" function? 
Does it dynamically allocate memory in the buffer? 
(Sorry for my ignorance -- I tried looking at the API
for this, but couldn't find the info that I needed. 
I'm just trying to ensure that I don't end up with
memory leaks in my application.)

Thanks,
Monica  

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


Mime
View raw message