1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Clear session

Discussion in 'ASP' started by tsalexey544, Feb 17, 2007.

  1. tsalexey544

    tsalexey544 New Member

    Hi, I posted this question but somehow it is not here =(

    When I release session objects I do this


    So whats the difference when I do this

    set session("username")=nothing

    Isn't I already release it with a null value?
  2. shabbir

    shabbir Administrator Staff Member

    Session.Remove actually removes the key from the session collection, whereas setting the key = nothing, essentially does the same, but the key still exists in the collection. Performance wise, just setting the key value = nothing will be faster, as there really isn't a reason to remove the key, especially if later you may just add it back.

Share This Page