On Mon, Jun 30, 2003 at 09:45:49AM -0700, Eric Larkin wrote:

> Just to be clear - we are not explicitly using namespaces anywhere in our
> scripts.  We are just "set"-ing local variables, e.g.:
>
> set foo bar
>
> I believe this is standard programming practice with AOLserver.  Is it
> correct that AOLserver simply abandons memory allocated to such local
> variables after a script has executed?  I have to confess that I'm *very*

Of course not.  But last time I checked (admitedly a long time ago, in
an older 3.x version of AOLserver), local variables still hung around
in the connection thread where they were created, even after the
connection was closed.  In other words, if you did "set foo bar" on a
page being serviced by thread conn1, the next time you used conn1,
variable foo would still be there.

I'm not sure when or where the Tcl garbage collector might come into
play, but since you did "set foo" in the top level presumably foo will
never go out of scope and be garbage collected until the thread is
destroyed.

Are you setting these variables in the top level, or inside a proc?
Are you setting the SAME or different variables each time you use the
page?  Because if you do set foo1 the first time, then set foo2 the
second time around, etc., maybe you end up creating a whole mess of
variables hanging around in the top level scope of that thread,
sucking up memory.

--
Andrew Piskorski <[EMAIL PROTECTED]>
http://www.piskorski.com


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of 
your email blank.

Reply via email to