Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 7177F4766F6 for ; Tue, 7 Jan 2003 23:23:38 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id B7013476678 for ; Tue, 7 Jan 2003 23:23:37 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h084Nc0U000788; Tue, 7 Jan 2003 23:23:38 -0500 (EST) To: ljb , g.hintermayer@inode.at Cc: pgsql-interfaces@postgresql.org Subject: Re: still memory leaks with libpgtcl In-reply-to: References: Comments: In-reply-to ljb message dated "Wed, 08 Jan 2003 03:08:11 +0000" Date: Tue, 07 Jan 2003 23:23:38 -0500 Message-ID: <785.1041999818@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/33 X-Sequence-Number: 3533 ljb 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