On 8/1/07, Neophytos Demetriou <[EMAIL PROTECTED]> wrote:
>
> I have thus removed nstrace.tcl and modified init.tcl from 4.99.1 by
> adding the following snippet in the end of the file:
>
> ns_ictl trace allocate ns_init
> ns_ictl trace deallocate ns_cleanup
>
> It seems to be working ok.


The problem here was an Ns_Set containing query variables, which is
allocated by and belongs to the Ns_Conn code, is made available to an
interp when you call ns_conn getform.

After the connection, the query-set is freed by the Ns_Conn code but
unless you call ns_set cleanup explicitly, a pointer to it remains in
the interp and is reused for the next connection.

Don't do that :-)

Seems maybe a little fragile... Not sure if set-cleanup should be
triggered from C code or not. I guess you really want to make sure
that sets owned by other code always get cleaned up, whereas sets
owned by Tcl usually get cleaned up, by the call to ns_set cleanup in
init.tcl.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to