File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 13037
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.
I agree. Here's the link:
subject: removeAttribute
It's not a secret anymore!