Sessions will stay active until:
1) No page from the site in question is accessed within the set session timeout period (default 20 minutes)
2) All browser windows are closed to all sites and the browser itself has quit
It will not clear the session when a window is closed.