qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Yeoh (JIRA)" <j...@apache.org>
Subject [jira] [Created] (QPID-7187) Memory leak when calling in qpid::messaging::Connection::open()
Date Thu, 07 Apr 2016 00:21:25 GMT
Jeff Yeoh created QPID-7187:
-------------------------------

             Summary: Memory leak when calling in qpid::messaging::Connection::open()
                 Key: QPID-7187
                 URL: https://issues.apache.org/jira/browse/QPID-7187
             Project: Qpid
          Issue Type: Bug
          Components: C++ Client
    Affects Versions: qpid-cpp-0.34
         Environment: Windows 7, using ActiveMQ 5.12 as broker
            Reporter: Jeff Yeoh


Memory leak detected using _CrtDumpMemoryLeaks();

It happened whenever qpid::messaging::Connection::open() is called. Even though by the end
of the session, I called connection.close() to close the connection, the leak still happens.

Here's the snapshot of the code:

qpid::messaging::Connection connection(brokerUrl, protocolConnectionString);

        // Now send the message
        try
        {
            connection.open();
            qpid::messaging::Session session = connection.createSession();
            qpid::messaging::Sender sender = session.createSender("channel");
            sender.send(message);
            session.sync();
            connection.close();
            
        }
        catch (const std::exception& error)
        {
            connection.close();
            return false;
        }

Here's the summary of memory leak:

Detected memory leaks!
Dumping objects ->
{26638} normal block at 0x00A6F1E8, 8 bytes long.
 Data: <        > 08 AF A3 00 00 00 00 00
{26637} normal block at 0x00A51FC8, 8 bytes long.
 Data: <        > EC AE A3 00 00 00 00 00
{26636} normal block at 0x00A3AEA0, 136 bytes long.
 Data: <`()      /W     > 60 28 29 10 CD CD CD CD F5 2F 57 01 CD CD CD CD
Object dump complete.

Note that I did not use the C++ broker. I used ActiveMQ 5.12 as the broker using AMQP 1.0



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message