You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by Steve Chuang <sc...@ipnet-solutions.com> on 2000/03/23 20:52:18 UTC
memory leaks
To whom it may concern,
I'm experiencing some memory leaks. Here are all the details that I can
provide.
* Just by calling XMLPlatformUtils::Initialize() and doing absolutely
no parsing, I'm getting memory leaks when my test program terminates.
* I have attached a text file which contains contents that I copied
and pasted from the MSVC++ debug window.
* I stepped into the XMLPlatformUtils::Initialize() function, and
noticed that it calls the new operator there and some of the functions that
it calls. I searched all over the place and couldn't find any
uninitialization/cleanup code that deletes those pointers.
Here's some information you'll need according to the feedback procedures...
* Version of Xerces-C: 1.1.0
* OS platform: NT4 + SP4
* Compiler/version: MSVC++ 6.0
Thanks in advance for your help.
Regards,
Steve Chuang
IPNet Solutions, Inc.
<<leak.txt>>
Re: memory leaks
Posted by Andy Heninger <he...@us.ibm.com>.
What you are seeing as leaks are actually memory blocks that are lazily
allocated by the XML library when they are first needed, and which are
deliberately allowed to remain in existence indefinitely. Even though they
are on the heap, they are conceptually more like static objects, and,
indeed, they probably would have been if statics didn't have other problems
with the ordering of initialization on some platforms.
Many memory leak checking tools are confused by this kind of usage.
The best leak test is to put a test program running in a loop, and let it go
overnight, or even longer. Even small leaks will quickly show up in the
memory usage statistics for the process. We use the ThreadTest test program
for this purpose.
-- Andy
----- Original Message -----
From: "Steve Chuang" <sc...@ipnet-solutions.com>
To: <xe...@xml.apache.org>
Cc: "Robert Asis" <ra...@ipnet-solutions.com>; "Alex Matevossian"
<am...@ipnet-solutions.com>
Sent: Thursday, March 23, 2000 11:52 AM
Subject: memory leaks
> To whom it may concern,
>
> I'm experiencing some memory leaks. Here are all the details that I can
> provide.
> * Just by calling XMLPlatformUtils::Initialize() and doing absolutely
> no parsing, I'm getting memory leaks when my test program terminates.
> * I have attached a text file which contains contents that I copied
> and pasted from the MSVC++ debug window.
> * I stepped into the XMLPlatformUtils::Initialize() function, and
> noticed that it calls the new operator there and some of the functions
that
> it calls. I searched all over the place and couldn't find any
> uninitialization/cleanup code that deletes those pointers.
>
> Here's some information you'll need according to the feedback
procedures...
> * Version of Xerces-C: 1.1.0
> * OS platform: NT4 + SP4
> * Compiler/version: MSVC++ 6.0
>
> Thanks in advance for your help.
>
> Regards,
> Steve Chuang
> IPNet Solutions, Inc.
> <<leak.txt>>
>