J
johndesp
Guys, I have been working through a memory leak and need to go back to
square one for some understanding about have Garbage collection works
with java 1.4.x.
Will Garbage Collection clean up the String variable named test in the
method doSomething(String inme) ? I ask this stupid question because I
am seeing odd results. Also, Can you explain why? Thanks
Example:
inside...some servlet code...
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
doSomething("whatever");
}
private boolean doSomething(String inme) {
String test = "";
test = inme;
boolean sendback = true;
return sendback;
}
square one for some understanding about have Garbage collection works
with java 1.4.x.
Will Garbage Collection clean up the String variable named test in the
method doSomething(String inme) ? I ask this stupid question because I
am seeing odd results. Also, Can you explain why? Thanks
Example:
inside...some servlet code...
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
doSomething("whatever");
}
private boolean doSomething(String inme) {
String test = "";
test = inme;
boolean sendback = true;
return sendback;
}