logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Re: Memory leak - sorry - false detection: msg#00075

apache.logging.log4cxx.user

Subject: Re: Memory leak - sorry - false detection

I will continue my monologue  :-)
The obvious solution to this problem is to use a release built version of log4cxx, and if you want to be able to debug log4cxx, you could "Use MFC in a static library".

Björn Carlsson wrote:
Now I found an answer to this, on unloading mfc-dll memory leaks are checked too soon...
"static class members which are destroyed after the leak dump is displayed"


Björn Carlsson wrote:
I continued to test, and made a similar application in VS6, and I also built log4cxx using VS6.
I added:
     BasicConfigurator::configure();
     LOG4CXX_INFO(logger, "Entering application.");
in the application constructor, also in this case a get a massive memory leak is detected on application exit?? Anybody else who's got this problem? Time to file a bug report?

Björn Carlsson wrote:
I use the CVS HEAD version.
I have been struggling for some time with a memory leak caused by log4cxx. If I make a very simple MFC Application (for example wizard generated, dialog based) using VS.NET 2003.  I add log4cxxd.lib as an additional dependencie.
If I then add for example
LoggerPtr BELogger = Logger::getRootLogger();
then I get a massive memory leak.
The application does nothing. Have I missed something?

the only code I added to the wizard generated application was:
#include <log4cxx/logger.h>
using namespace log4cxx;
LoggerPtr BELogger = Logger::getRootLogger();
I could change the getRootLogger call to some other log4cxx call and get the same result.
Do I need some cleanup code?
Log4cxx was build using ant and VS.NET 2003-vsvars.bat, with no parameters, so it should be shared debug...
And the testapp was a none unicode debug configuration.

--
/Björn Carlsson
VersionSupport.com

<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo