Re: still memory leaks with libpgtcl

Поиск
Список
Период
Сортировка
От Gerhard Hintermayer
Тема Re: still memory leaks with libpgtcl
Дата
Msg-id avjlg4$28o0$1@news.hub.org
обсуждение исходный текст
Ответ на Re: still memory leaks with libpgtcl  (ljb <lbayuk@mindspring.com>)
Список pgsql-interfaces
Here's a short answer on my posting "deep Tcl_Channel question" to c.l.t.

>>Can anybody of the tcl-gurus please enlighten me.>>I have a problem with the tcl extension to the postgreSQL
database.>>Theextension wraps a client channel around an existing TCP-Socket>>(which ist created by an external
library).>>Theproblem is, that the closeProc of the created Tcl_Channel is>>sometimes called with interp NULL and
sometimeswith a valid interp.>>Some tcl-functions are very unhappy with passed NULL-interp
(e.g.>>Tcl_DontCallWhenDeleted).>>>>Myquestion is: When is the close proc passed a valid interp and when>>a NULL
pointeras parameter ?>>>>Thanks>>>>Gerhard
 

>Off hand, I think Tcl_Close() is called with a NULL interp when Tcl is>shutting down.  Or, if the channel was never
associatedto a particular>interp with Tcl_RegisterChannel().>>If you use Tcl_RegisterChannel(), you might not need to
usea>Tcl_InterpDeleteProc for Tcl_CallWhenDeleted().>-->David Gravereaux <davygrvy@pobox.com>>[species: human; planet:
earth,milkyway,alphasector]
 

This is just like I did see it, in a normal interpreter shutdown and in 
case of an error interp is NULL, and a valid interp else. So I think it 
is ok, to check for NULL interp berfore calling Tcl functions that don't 
check for NULL pointers themselves.

Tom are you happy with that explanation ?


Gerhard



В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Graham Wilson
Дата:
Сообщение: Recasting types
Следующее
От: "Key88 SF"
Дата:
Сообщение: Re: libpqxx Large Objects