Message-ID: From: "davecramer (@davecramer)" To: "postgresql-interfaces/psqlodbc" Date: Mon, 13 May 2024 20:07:56 +0000 Subject: Re: [postgresql-interfaces/psqlodbc] issue #8: Memory leaks detected in psqlodbc library In-Reply-To: References: List-Id: X-GitHub-Author-Login: davecramer X-GitHub-Comment-Id: 2108705764 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 8 X-GitHub-Repo: postgresql-interfaces/psqlodbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/postgresql-interfaces/psqlodbc/issues/8#issuecomment-2108705764 Content-Type: text/plain; charset=utf-8 > That's incorrect. What this function doing, is completely "releasing" COL_INFO objects from ConnectionClass object. No mater if these objects actually destroyed or not, connection object will not have any one of them. So it's just zeroing `self->ntables`, and it is correct. The problem is: > > * if "destroy" is true (when connection is closing), COL_INFO objects will always be deleted. That's good. > * but if "destroy" is false (col_info cache is obsolete), COL_INFO objects will not be deleted, just detached from ConnectionClass object, without correct releasing using refcnt. That's bad :( Help me out here, where are they "released" ? > > Today i finally had some spare time to begin working on psqlodbc project, in the near future i will post detailed memory leaks report from tests. And maybe will begin fixing these issues. That would be excellent!