473,399 Members | 3,302 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

destroy XercesDOMParser object caused memory violation

Hi,
Look at following simple code block:
---
XercesDOMParser *parser = 0;
try
{
XMLPlatformUtils::Initialize()
parser = new XercesDOMParser();
}
catch (...)
{
cout<< "Unknown error detected in parse()"<<endl;
}

delete parser;
XMLPlatformUtils::Terminate();
--
In my simple test application's main function, this block runs well.
But when I put this block in my business application's XML parsing
function, it fails with message
"memory corrupted...". And the error occurs only when processing the
delete statement.
Though this application is multi-threaded, I think the function is
executed in a single thread. -- would it be a problem if this function
is executed in multiple theads?
Without the block, the function runs well.
So, what could be the reason of the error?
I studied the default MemoryManager, and found nothing special.
I really have no idea

Jul 20 '07 #1
2 2236
I'd suggest contacting Xerces-C's own mailing list; that's where you'll
find the most expertise on the code's internals.

At a guess, I think you've answered your own question: If it hurts when
you do that...
Jul 20 '07 #2
Meal wrote:
"memory corrupted...". And the error occurs only when processing the
delete statement.
Actually, come to think of it, that sounds like some of your other code
is walking on the parser's data structures so they can't be deleted
cleanly...
--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Jul 20 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

43
by: Sarfraz Hooda | last post by:
Hi, I have created an array of Objects in a collection. I was wondering is there a way to destroy the array to free up the space in the memory ? or they are automatically destroyed and garbagge...
30
by: jimjim | last post by:
Hello, This is a simple question for you all, I guess . int main(){ double *g= new double; *g = 9; delete g; cout<< sizeof(g)<<" "<<sizeof(double)<<" "<<sizeof(*g)<<" "<<*g<<" "<<endl; *g =...
4
by: Peter Oliphant | last post by:
I'd like to be able to destroy a Timer in it's own event handler. That is, within it's tick handler I'd like to delete the Timer itself (e.g., for one-shot timers). Is this possible? In general,...
8
by: vvenk | last post by:
Hello: I just wrote my first ASP.Net application. It worked fine on my machine and when I put into production, the ASP.Net process reaches 50% quite fast and then the system does not work...
1
by: Miguel Ribeiro | last post by:
Hi, The crux of my problem is that I want to destroy an object without using the reference (by using a collection etc.) and have the reference basically show 'nothing' I have a MDI form with...
5
by: Michael Moreno | last post by:
Hello, In a class I have this code: public object Obj; If Obj is a COM object I would like to call in the Dispose() method the following code: ...
5
by: hammer1234 | last post by:
Hello I would like to create a test case that violates the following MISRA C:2004 rule . Misra Rule 18.2. An object shall not be assigned to an overlapping object. "The behaviour is...
13
by: Mike S | last post by:
I came across the following paragraph in the "Semantics" section for simple assignment in N1124 (C99 draft) and I'm wondering if I'm interpreting it right: 6.5.16.1p3: If the value being...
4
by: Juergen-Bernhard Adler | last post by:
Hello, pretend some noob has (in a fake-static class) provided the following method public static kill_object($obj) { if (!is_object($obj)) return false;
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.