We did run our application under valgrind on Linux. We did not see any leaks. There is no platform dependent code in our application. We are seeing gradual memory growth only on windows.
That is what lead me to believe the leak may be present in postgresql. I will run under available memory tools on windows and get back to you.
I will also try to create a sample and see if I can reproduce the problem.
Okay. I will try to create one sample program and send it to you sometime next week. In the meantime, I am listing down all the methods we are consuming from libpq.