Re: still memory leaks with libpgtcl - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: still memory leaks with libpgtcl
Date
Msg-id 785.1041999818@sss.pgh.pa.us
Whole thread Raw
In response to Re: still memory leaks with libpgtcl  (ljb <lbayuk@mindspring.com>)
List pgsql-interfaces
ljb <lbayuk@mindspring.com> writes:
> This patch is
> seriously ugly and 'highly suspect', and I am NOT suggesting this be
> included in the PostgreSQL release. Really. But it works. Maybe.

What we really need to do is reel in a Tcl guru to look at this.
I think that there is a Tcl bug here somewhere; even if not, we seem
to need someone who knows the Tcl library inside-and-out to tell us
what we're doing wrong.

I don't have the time or interest to pursue this with the Tcl community,
but perhaps one of you can do it?

> -#ifdef NOT_USED
>  #if TCL_MAJOR_VERSION >= 8
> -    if (connid->notifier_channel != NULL)
> +    if (connid->notifier_channel != NULL && interp != NULL)
>          Tcl_UnregisterChannel(NULL, connid->notifier_channel);
>  #endif
> -#endif

Cool solution if it works --- but I'll not accept it unless someone can
explain to me *why* it fixes the problem, and preferably just where in
the Tcl documentation this is promised to be a correct solution...
        regards, tom lane


pgsql-interfaces by date:

Previous
From: Tom Lane
Date:
Subject: Re: [ADMIN] pgdb.py is still wrong in Postgres 7.3.1 rpm
Next
From: Gerhard Hintermayer
Date:
Subject: Re: still memory leaks with libpgtcl