releasing session variables


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: releasing session variables

  1. #1
    Matt Markus Guest

    releasing session variables


    Hi,

    I have a bunch of session variables that I want to set, use, then release.
    Is this possible? I know I can abandon a users session, but I want to abandon
    individual session variables. Example:

    Session("UserEmail") = "bla@bla.com"
    Server.Execute("email.asp")
    Session("UserEmail").clear

    I'm using a lot session variables to pass data between forms, and once I'm
    done with them, I want to release any memory associated with their usage.

    Thanks!

  2. #2
    Russell Jones Guest

    Re: releasing session variables

    Set them to an empty string.

    "Matt Markus" <MattMarkus@MSNHealth.com> wrote in message
    news:3eee1ccc$1@tnews.web.devx.com...
    >
    > Hi,
    >
    > I have a bunch of session variables that I want to set, use, then release.
    > Is this possible? I know I can abandon a users session, but I want to

    abandon
    > individual session variables. Example:
    >
    > Session("UserEmail") = "bla@bla.com"
    > Server.Execute("email.asp")
    > Session("UserEmail").clear
    >
    > I'm using a lot session variables to pass data between forms, and once I'm
    > done with them, I want to release any memory associated with their usage.
    >
    > Thanks!




  3. #3
    Matt Markus Guest

    Re: releasing session variables


    That would be just changing the value of the variable. I want to make the
    session variable non-existent, gone, zilch, zap. I don't think setting it
    to "" is going to release the resources it's consuming.

    Matt
    "Russell Jones" <arj1@nospam.northstate.net> wrote:
    >Set them to an empty string.
    >
    >"Matt Markus" <MattMarkus@MSNHealth.com> wrote in message
    >news:3eee1ccc$1@tnews.web.devx.com...
    >>
    >> Hi,
    >>
    >> I have a bunch of session variables that I want to set, use, then release.
    >> Is this possible? I know I can abandon a users session, but I want to

    >abandon
    >> individual session variables. Example:
    >>
    >> Session("UserEmail") = "bla@bla.com"
    >> Server.Execute("email.asp")
    >> Session("UserEmail").clear
    >>
    >> I'm using a lot session variables to pass data between forms, and once

    I'm
    >> done with them, I want to release any memory associated with their usage.
    >>
    >> Thanks!

    >
    >



  4. #4
    Russell Jones Guest

    Re: releasing session variables

    See the Session.Contents.Remove method.

    "Matt Markus" <MattMarkus@MSNHealth.com> wrote in message
    news:3eee3028$1@tnews.web.devx.com...
    >
    > That would be just changing the value of the variable. I want to make the
    > session variable non-existent, gone, zilch, zap. I don't think setting it
    > to "" is going to release the resources it's consuming.
    >
    > Matt
    > "Russell Jones" <arj1@nospam.northstate.net> wrote:
    > >Set them to an empty string.
    > >
    > >"Matt Markus" <MattMarkus@MSNHealth.com> wrote in message
    > >news:3eee1ccc$1@tnews.web.devx.com...
    > >>
    > >> Hi,
    > >>
    > >> I have a bunch of session variables that I want to set, use, then

    release.
    > >> Is this possible? I know I can abandon a users session, but I want to

    > >abandon
    > >> individual session variables. Example:
    > >>
    > >> Session("UserEmail") = "bla@bla.com"
    > >> Server.Execute("email.asp")
    > >> Session("UserEmail").clear
    > >>
    > >> I'm using a lot session variables to pass data between forms, and once

    > I'm
    > >> done with them, I want to release any memory associated with their

    usage.
    > >>
    > >> Thanks!

    > >
    > >

    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center