Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXCVS-0008IG-61 for pgsql-bugs@arkaria.postgresql.org; Mon, 07 Apr 2014 16:34:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WXCVR-0005RV-3q for pgsql-bugs@arkaria.postgresql.org; Mon, 07 Apr 2014 16:34:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXCVQ-0005RO-3q for pgsql-bugs@postgresql.org; Mon, 07 Apr 2014 16:34:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXCVN-0001xg-Gz for pgsql-bugs@postgresql.org; Mon, 07 Apr 2014 16:34:43 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s37GYapB021548; Mon, 7 Apr 2014 12:34:37 -0400 From: Tom Lane To: Souheila Hechaichi cc: "'pgsql-bugs@postgresql.org'" Subject: Re: Postgres resources not released after call PQclear In-reply-to: <693DE4B55EAFC549AD60C5439067053A05B30214F9@usnapexchmbx01.asg.com> References: <693DE4B55EAFC549AD60C5439067053A05B30214F9@usnapexchmbx01.asg.com> Comments: In-reply-to Souheila Hechaichi message dated "Mon, 07 Apr 2014 12:03:42 -0400" Date: Mon, 07 Apr 2014 12:34:36 -0400 Message-ID: <21547.1396888476@sss.pgh.pa.us> X-Pg-Spam-Score: -2.2 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Souheila Hechaichi writes: > I observe that when the row number about a SELECT SQL request is equal to zero, the function PQclear does not release the allocated resources and a memory leak are detected into my application. This claim is, to be frank, pretty astonishing. Can you produce a self-contained test case to demonstrate that there's a leak? > And I call the function _CrtDumpMemoryLeaks() at the end of my application, to display all the memory leak. I doubt that that proves anything at all. Such a function can't tell whether libpq is holding onto memory internally. If you see growth in memory usage over repeated query cycles, then it would be interesting. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs