activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spam trap <nospam.1.friedbad...@spamgourmet.com>
Subject Possible memory leak with ActiveMQ-CPP
Date Wed, 25 Nov 2015 10:47:08 GMT
Hi,

I have the following code:

cms::Message *pMessage;
...
std::vector<std::string> propertyNames = pMessage->getPropertyNames();

According to valgrind this leaks memory.  propertyNames is on the
stack BTW.

==27758== 50,039,920 (289,968 direct, 49,749,952 indirect) bytes in
6,041 blocks are definitely lost in loss record 383 of 384
==27758==    at 0x4A075FC: operator new(unsigned long)
(vg_replace_malloc.c:298)
==27758==    by 0x5F77EF9: decaf::util::StlMap<std::string,
activemq::util::PrimitiveValueNode,
decaf::util::comparators::Less<std::string> >::keySet() const
(StlMap.h:866)
==27758==    by 0x5C3799E:
activemq::commands::ActiveMQMessageTemplate<cms::BytesMessage>::getPropertyNames()
const (ActiveMQMessageTemplate.h:109)

Any ideas?


Mime
View raw message