Memory Leak: Do I need to explicitly free memory reference for collection?

Hi,

My web application uses JRockit JDK 1.4.2, Java Servlet, JSP &Struts. It is a clustered environment using WL 8.1 sp 4. I am investigating whether there are any memory leaks in the application & what are best practices to avoid leaks.

A specific scenario is as follows:

For an incoming request, the struts action class creates object 慜?(of class A) and set 慜?as a request attribute. This request attribute is used to display values on the JSP.

Now, class A has a heavily nested structure: Class A has object of class B, where B has a HashSet of objects of type C and where C has an object of type D and E.

Though I set this object 慜?in request scope, do I need to explicitly nullify any of the references within object 慜? Can 搉ot doing this?result in a memory leak?

Thanks in advance,

sjaiprakash

[857 byte] By [sjaiprakasha] at [2007-11-15]