Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

some variables released from memory?

Status
Not open for further replies.

influent

Programmer
Jan 11, 2001
131
US
Are some variables automatically released from memory when using vbscript? For example, is a procedure-level string variable released automatically when the procedure ends? What if it's a page-wide variable? Are all variables that are not global application variables automatically released from memory when the user leaves the page?
 
Hi ...
when you create a variable ( any kind, Int or Str or ... ) in a Sub or Function, it only works in that sub or function and when the procedure ends, the variables will be released.
if you want to use then outside the procedure, you have to use Dim and Dim the variable outside the procedure ( it's better to do it at te beginning of the page)
and all the variables in one page will be release then you change the page.
if you need to use a global variable to work in all pages, you only have to use Session variable.
----
TNX.
E.T.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top