Postgres resources not released after call PQclear
Hello;
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.
To reproduce the problem I do the following steps:
- To detect the memory leak I have enabled them via the Microsoft procedure .
Include the following files
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
And I call the function _CrtDumpMemoryLeaks() at the end of my application, to display all the memory leak.
- I call the PQexec function to execute the SQL request and after it end I call PQclear to release the allocated ressouces.
Can you give me a help about this bug?
Best regards;
[cid:image001.png@01CF528A.DD5651E0]<http://www.asg.com/>
Souheila Hechaichi, Software Engineer
souheila.hechaichi@asg.com<mailto:souheila.hechaichi@asg.com> | 33.164.868386
www.asg.com<http://www.asg.com/> |
[cid:image002.png@01CF528A.DD5651E0]<https://www.facebook.com/ASGSoftwareSolutions>[cid:image003.png@01CF528A.DD5651E0]<https://twitter.com/#!/asgsoftware>[cid:image004.png@01CF528A.DD5651E0]<https://www.linkedin.com/company/asg>[cid:image005.png@01CF528A.DD5651E0]<https://www.youtube.com/asgtech>
Registergericht/Registered Office: Amtsgericht München HRA 72107
Geschäftsführer/General Manager: Arthur Allen
Umsatzsteuernummer/VAT No.: DE 192144187
P Please consider the environment before printing this email.
Souheila Hechaichi <Souheila.Hechaichi@asg.com> 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