Re: How to properly fix memory leak

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Igor Korot <ikorot01(at)gmail(dot)com>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: How to properly fix memory leak
Date: 2025-04-26 21:34:57
Message-ID: 132172.1745703297@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Igor Korot <ikorot01(at)gmail(dot)com> writes:
>>>> auto temp1 = m_pimpl->m_myconv.from_bytes( PQgetvalue(
>>>> res, i, 1 ) );
>>>> m_tablespaces.push_back( temp1 );

I would imagine that from_bytes() is producing a malloc'd
string. Which part of this is responsible for seeing that
that gets freed?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Igor Korot 2025-04-26 21:43:27 Re: How to properly fix memory leak
Previous Message Igor Korot 2025-04-26 20:53:58 Re: How to properly fix memory leak