That your finalize method is called, doesn't mean that
the garbage collector has released your objects. The 
only way to be shure that this happens, is to explicitly
run System.gc(). Otherwise it's up to the VM when it will
free the memory. (Sun's JDK per default only releases
memory if otherwise an OutOfMemoryError would occur, so
unless you reach this border the VM will constanly grow)

See also the options for the JVM:
  -verbose:gc (Any VM)
  -Xincgc (Sun SDK 1.3.*)
  -Xms (Sun + IBM)
  -Xmx (Sun + IBM)

-----Ursprüngliche Nachricht-----
Von: Garry De Toffoli [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 3. Mai 2001 14:34
An: [EMAIL PROTECTED]
Betreff: Memory usage

<snip/>
I have in trouble with the memory usage with Tomcat 3.21, WinNt 2000 
and Jdk 1.3 of Sun. the problem is that any operation does not release 
the memory occuped; to control the memory usage I use the Task Manager;
when Tomcat start, the memory used from the process Java is of 9608 K;
when I request a Jsp page that has an error, like a variable not declared, 
the memory used is 11868K; if I wait for 1 ay also, this value does not 
change, so the memory used is not released,

running a correct Jsp page, the memory used increase, and this is not 
released yet; 
I have written a log on the finalize method of my class, and this is 
called, so the garbage collector release all my object.
 
This behavoir is normal? 
Probably changing the version of Tomcat this problem may be corrected.
<snip/> 

Reply via email to