On 6/1/06, Mannion, Enda <[EMAIL PROTECTED]> wrote:
Hi I have a memory leak in this function, can anyone see where? Do I
need to release const XMLCh* n; at the bottom, how do I do this.

list = xmlDoc->getElementsByTagName( XMLString::transcode(szTag.c_str())
);


I'll let the C++ experts answer, but this line looks suspicious.
Anytime you use transcode you *must* delete the output. But you aren't
saving a pointer to the output, you are passing it as a temporary.

Cheers, jas.

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

Reply via email to