Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 60385 invoked from network); 23 Apr 2007 14:20:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Apr 2007 14:20:02 -0000 Received: (qmail 21627 invoked by uid 500); 23 Apr 2007 14:20:03 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 21607 invoked by uid 500); 23 Apr 2007 14:20:03 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 21542 invoked by uid 99); 23 Apr 2007 14:20:02 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Apr 2007 07:20:02 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Apr 2007 07:19:55 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E457071407D for ; Mon, 23 Apr 2007 07:19:34 -0700 (PDT) Message-ID: <23985598.1177337974929.JavaMail.jira@brutus> Date: Mon, 23 Apr 2007 07:19:34 -0700 (PDT) From: "Nathan Mittler (JIRA)" To: dev@activemq.apache.org Subject: [jira] Closed: (AMQCPP-68) Memory Leak in Message transport / send / recieve C++ client MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQCPP-68?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nathan Mittler closed AMQCPP-68. -------------------------------- Resolution: Won't Fix We are only going to be supporting the activemq-cpp client > Memory Leak in Message transport / send / recieve C++ client > ------------------------------------------------------------ > > Key: AMQCPP-68 > URL: https://issues.apache.org/activemq/browse/AMQCPP-68 > Project: ActiveMQ C++ Client > Issue Type: Bug > Components: Other C++ Clients > Environment: Win XP, VC++ Version 8 > Reporter: Tomas Lebovic > Priority: Critical > > There seems to be a memory leak in the message transport. If we take the following simple code below and then monitor memory consumption we will see it steadily go up. > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > using namespace apache::activemq; > using namespace apache::ppr::net; > class TestAsynchTopic :public IMessageListener > { > private: > public: > void onMessage(p message) > { > p msg = p_dyncast (message) ; > printf("got %s\n",msg->getString("msg")->c_str()); > msg = NULL; > } > } ; > char * bunk = "memory leak?"; > int main() > { > TestAsynchTopic list1; > > p uri = new Uri("tcp://localhost:61616"); > p factory = new ConnectionFactory(uri); > p session = NULL; > p topic = NULL ; > p consumer1 = NULL; > p message = NULL ; > p producer = NULL ; > try > { > p connection = factory->createConnection(); > session= connection->createSession(); > } > catch(ConnectionException &e) > { > printf("%s\n",e.what()); > } > > topic = session->getTopic("memory.leak") ; > producer = session->createProducer(topic) ; > consumer1 = session->createConsumer(topic) ; > consumer1->setMessageListener( smartify(&list1) ) ; > while(1) > { > message = session->createMapMessage(); > message->setString("msg", (char*)bunk); > producer->send(message); > message = NULL; > } > return 0; > } > > Now i haven't been using c++ api for a long time but i can't see any way to destroy the messages other then letting them go out of scope or when refrence count = 0. So if there is a way to destroy the messages after they are sent / recieved please let me know. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.