Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 93739200D37 for ; Thu, 9 Nov 2017 20:48:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 90515160BEF; Thu, 9 Nov 2017 19:48:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D676C1609C8 for ; Thu, 9 Nov 2017 20:48:04 +0100 (CET) Received: (qmail 20396 invoked by uid 500); 9 Nov 2017 19:48:04 -0000 Mailing-List: contact issues-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 issues@activemq.apache.org Received: (qmail 20386 invoked by uid 99); 9 Nov 2017 19:48:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Nov 2017 19:48:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 25AF11A3E98 for ; Thu, 9 Nov 2017 19:48:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 7qqLljBXZ7q2 for ; Thu, 9 Nov 2017 19:48:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 1B9F46176C for ; Thu, 9 Nov 2017 19:48:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 9E1ACE0635 for ; Thu, 9 Nov 2017 19:48:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 5C4A5240CE for ; Thu, 9 Nov 2017 19:48:00 +0000 (UTC) Date: Thu, 9 Nov 2017 19:48:00 +0000 (UTC) From: "Francois Godin (JIRA)" To: issues@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMQCPP-592) memory and handle leak of session MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 09 Nov 2017 19:48:05 -0000 [ https://issues.apache.org/jira/browse/AMQCPP-592?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1624= 6384#comment-16246384 ]=20 Francois Godin commented on AMQCPP-592: --------------------------------------- Duplicate of https://issues.apache.org/jira/browse/AMQCPP-560 ?? > memory and handle leak of session > ---------------------------------- > > Key: AMQCPP-592 > URL: https://issues.apache.org/jira/browse/AMQCPP-592 > Project: ActiveMQ C++ Client > Issue Type: Bug > Components: CMS Impl > Affects Versions: 3.9.1 > Environment: IDE is VS2008 and OS is win7=20 > boost is 1.58.0 > Reporter: jerrytan > Assignee: Timothy Bish > Priority: Critical > > if we keep creating one thread and then create one session ( all sessio= ns share a common connnection ) , then close session and thread ; the = memory and handle is leak, and eventually causing an ugly crash > statistical information =EF=BC=9A from 8:00 am to 14:00 pm > memory / handle is begin with(1,612k/ 161) end with (22,300k/ 11,218) > here is my code: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > #include > #include > #include > #include > #include > #include > #Include > using boost::shared_ptr > using namespace cms; > using namespace std; > void fun(Connection* conn) > { > // =3D=3D create session=3D=3D > Session* session =3D conn->createSession(Session::AUTO_ACKNOWLEDGE); > //=3D=3D close session=3D=3D > session->close(); > delete session; > Sleep(500); > } > int main() > { > activemq::library::ActiveMQCPP::initializeLibrary(); > ConnectionFactory* connectionFactory =3D ConnectionFactory::createCMSC= onnectionFactory("failover:(tcp://127.0.0.1:61616)"); > Connection* connection =3D connectionFactory->createConnection(); > connection->start(); > while(1) > { > boost::thread Thread(fun, connection); //=3D=3D share common connect= ion > Thread.join(); > } > } -- This message was sent by Atlassian JIRA (v6.4.14#64029)