From: | g(dot)hintermayer(at)inode(dot)at (Gerhard Hintermayer) |
---|---|
To: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: still memory leaks with libpgtcl |
Date: | 2003-01-16 09:34:06 |
Message-ID: | bd4db85f.0301160134.499958fb@posting.google.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
ljb <lbayuk(at)mindspring(dot)com> wrote in message
> [...]
> (This is for PostgreSQL-7.3.1)
>
> --- src/interfaces/libpgtcl/pgtclId.c.bak 2002-10-17 10:53:32.000000000 -0400
> +++ src/interfaces/libpgtcl/pgtclId.c 2003-01-07 21:51:53.000000000 -0500
> @@ -300,12 +300,10 @@
> * small) amount of memory taken for the channel state representation.
> * Note we are not leaking a socket, since libpq closed that already.
> */
> -#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
>
> /*
> * We must use Tcl_EventuallyFree because we don't want the connid
Your patch does indeed fix the memory leakage but seems to introduce
another problem. Every once in a while I do get segfaults, when I
enter the event loop after pg_disconnect-ing (well, it looks like that
to me). I have to say, that this is the only script, where the error
occurs. All others (~500) work with no problem at all. I was trying to
reproduce that in a short script, but - no way. I am not even sure, if
this is postgreSQL related. I did build a static wish with
--enable-symbols=all and --enable-memory to track the error down. Hope
I'll see more then.
Gerhard
From | Date | Subject | |
---|---|---|---|
Next Message | Laurette Cisneros | 2003-01-16 17:06:43 | compiling Pg |
Previous Message | Key88 SF | 2003-01-15 22:51:22 | libpqxx: Cursors needed??! |