Session Variables and reclaiming associated memory.

M

Mario

If there is an associated memory cost for using session variables, can
the memory used be reclaimed on an ASP page by setting the session
variable to undefined or null? If on the same ASP page you use a
different session variable name and after each refresh of the page,
set the previous session variable to undefined before using the next
session variable, does this reclaim the memory used in the previous
session variable, or does the usage of memory just continue to grow
with each page refresh?

Tex
 
S

swp

If there is an associated memory cost for using session variables, can
the memory used be reclaimed on an ASP page by setting the session
variable to undefined or null? If on the same ASP page you use a
different session variable name and after each refresh of the page,
set the previous session variable to undefined before using the next
session variable, does this reclaim the memory used in the previous
session variable, or does the usage of memory just continue to grow
with each page refresh?

Tex

When you say "undefined" above do you mean "nothing" or ""?

for example, which of these is appropriate to your situation:
DIM con, rs, sql
sql = "SELECT name, addr1, addr2, city, state, zip FROM people WHERE
flag<>'D' ORDER BY name"
set con = server.CreateObject("ADODB.Connection")
con.Open db_name, username, password ' fill in with your own system
dsn link and connectivity information
set rs = con.execute(xsql)
.... process stuff ...
con.close
set rs = nothing
set con = nothing

swp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top