You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andy Kriger <an...@gmail.com> on 2005/11/02 18:58:58 UTC

finalize question

I have a webapp that causes Tomcat to die with an OutOfMemoryError due
to PermGen after about 10 reloads. I am trying to determine if there
is a memory leak in my code or maybe even one of our 3rd-party
libraries. I am using AspectJ to log whenever any object's finalize
method is called. Problem is, I'm not seeing any finalize methods
being called. I have a ServletContextListener that calls System.gc to
help force collection (though I realize that's not guaranteed).

As far as Tomcat is concerned, when would objects in a webapp be
finalized? On app stop? On reload? On undeploy?

Any suggestions on how to isolate this memory leak?

thx
andy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: finalize question

Posted by Tim Funk <fu...@joedog.org>.
See ...
http://opensource2.atlassian.com/confluence/spring/pages/viewpage.action?pageId=2669

(I really need to update the FAQ on this one)

-Tim

Andy Kriger wrote:

> I have a webapp that causes Tomcat to die with an OutOfMemoryError due
> to PermGen after about 10 reloads. I am trying to determine if there
> is a memory leak in my code or maybe even one of our 3rd-party
> libraries. I am using AspectJ to log whenever any object's finalize
> method is called. Problem is, I'm not seeing any finalize methods
> being called. I have a ServletContextListener that calls System.gc to
> help force collection (though I realize that's not guaranteed).
> 
> As far as Tomcat is concerned, when would objects in a webapp be
> finalized? On app stop? On reload? On undeploy?
> 
> Any suggestions on how to isolate this memory leak?
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org