It's not a secret anymore!
The moose likes Servlets and the fly likes removeAttribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "removeAttribute" Watch "removeAttribute" New topic


friso jonge
Ranch Hand

Joined: Aug 06, 2002
Posts: 41
The above method in httpsession, does it clear its resources as well, (bascally setting the removed object to null) or is the attribute itself still available ?
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13027
You don't set an object to null, you set a reference to null. The reference in the session is set to null, whether or not the object you attached to a session is GCed when you remove it depends on if other references exist.
subject: removeAttribute
jQuery in Action, 3rd edition