activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From richardm <richard_manc...@hotmail.com>
Subject Re: ActiveMQ-CPP 3.4.2 memory leaks?
Date Sun, 13 May 2012 14:32:12 GMT

Thanks Tim,

I'm new to the group.  Does this mean that most of the development is done
on Linux?  This might be a Windows (Microsoft) -specific issue.

My tools are not that good, though I'll spend some time later today or
tomorrow to better understanding what I'm seeing.  All I know is that the
most basic dump of leaked memory indicates quite a few problems in the
Visual Studio environment.  I'm guessing this to be the same issue that I'm
bumping up against in my program.

If there's anyone else who has useful Windows tools, any effort would be
most helpful.  I've described my changes to the program below.


Richard


---------------------------------

What I have done is put the following the declarative section of the program
(line 41, after #includes):

#ifdef _DEBUG
#ifndef DEBUG_NEW
#include <stdlib.h>
#include <crtdbg.h>

#define _CRTDBG_MAP_ALLOC
#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
#define new DEBUG_NEW
#endif
#endif 

And then the following at the bottom of main():

#ifdef _DEBUG
_CrtDumpMemoryLeaks();
#endif

In reality the first change needs to be installed in all the ActiveMQ-cpp
source code, but I haven't reached that point yet.  This is a simplistic
approach to instruct the memory allocator to track memory usage and then to
dump the display leakage.  (google for more details.)



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-CPP-3-4-2-memory-leaks-tp4630355p4630522.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message