Hey Vladimir,
2010/9/24 Polyakov Vladimir <vvpolyakov(at)gmail(dot)com>
> Program written in C using Libpq, which receives large files (BYTEA)
> has a memory leak.
> I need to free ALL of the used memory after each sql query.
>
> after each call PQclear() I drop the buffer:
> conn->inBuffer = realloc(conn->inBuffer, 8192);
> conn->inBufSize = 8192;
>
> It works, but ..
> I noticed that in some cases PQclear() does not clear the memory.
> This happens only when the program receives certain files...
>
> Why do you need realloc() after PQclear()?
--
Regards,
Dmitriy