postgresql-interfaces/psqlodbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: progmachine (@progmachine) <[email protected]>
To: postgresql-interfaces/psqlodbc <[email protected]>
Subject: Re: [postgresql-interfaces/psqlodbc] issue #8: Memory leaks detected in psqlodbc library
Date: Tue, 14 May 2024 07:04:25 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

> ... and still self->ntables is set to 0 suggesting that there are no tables in the ConnectionClass object

`CC_clear_col_info` function makes exactly that: `ConnectionClass` object will not have any cached `COL_INFO` objects, after it's called.
> All I see is that if refcount is not zero they are skipped

refcnt lifetime management works like that - if refcnt is not zero then somewhere also is reference to object exist, and object must be destroyed somewhere else, where refcnt will be 0. `std::shared_ptr` in C++ works with the same principle.

I strongly suspect, that this refcnt mechanize is broken, and `destroy` function parameter used in `if` statement alongside with refcnt, is a crutch, designed to avoid rude memory leaks, while working by standard way.

view thread (31+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: github://postgresql-interfaces/psqlodbc
  Cc: [email protected], [email protected]
  Subject: Re: [postgresql-interfaces/psqlodbc] issue #8: Memory leaks detected in psqlodbc library
  In-Reply-To: <<[email protected]>>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox