You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by renganathan <re...@deccanetworld.com> on 2001/11/16 08:35:52 UTC
Transcode memory release problem
Dear All,
I am quite new to XML and I am finding some problems in releasing(deleting) the "transcoded" memory.
My code looks like this:
In a loop
{
char* TempNode = ReqMsgchild.getNodeName().transcode();
XMLString::trim(TempNode);
cout<<TempNode<<endl;
if (strcmp(TempNode, "attri-values") ==0)
MsgFieldsCount++;
delete [] TempNode;
}
ReqMsgchild is a DOM_Node.
I get an assertion failure randomly. I have similar loops where same the tempvariable is being used and deleted. The errors occur at different places at different times.
Can anyone suggest a solution for this problem. Proj. settings are done properly as instructed in the faqs and the list.
Thanks
&
Regards
Rengan
*********************************************
Read DIGITALLY & Save TREES !!
*********************************************
Re: Transcode memory release problem
Posted by Dean Roddey <dr...@charmedquark.com>.
Read the section of the FAQ about 'mixing runtimes'
--------------------------
Dean Roddey
The Charmed Quark Controller
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com
"If it don't have a control port, don't buy it!"
----- Original Message -----
From: renganathan
To: xerces-c-dev@xml.apache.org
Sent: Thursday, November 15, 2001 11:35 PM
Subject: Transcode memory release problem
Dear All,
I am quite new to XML and I am finding some problems in releasing(deleting) the "transcoded" memory.
My code looks like this:
In a loop
{
char* TempNode = ReqMsgchild.getNodeName().transcode();
XMLString::trim(TempNode);
cout<<TempNode<<endl;
if (strcmp(TempNode, "attri-values") ==0)
MsgFieldsCount++;
delete [] TempNode;
}
ReqMsgchild is a DOM_Node.
I get an assertion failure randomly. I have similar loops where same the tempvariable is being used and deleted. The errors occur at different places at different times.
Can anyone suggest a solution for this problem. Proj. settings are done properly as instructed in the faqs and the list.
Thanks
&
Regards
Rengan
*********************************************
Read DIGITALLY & Save TREES !!
*********************************************