tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Endre StĂžlsvik <En...@Stolsvik.com>
Subject Re: Tomcat memory-leak problem
Date Thu, 12 Jul 2001 06:31:45 GMT
On Wed, 11 Jul 2001, Boris Niyazov wrote:

| You should probably look at your code for possible memoey leaks: not closed db
| objects (statements, result sets, connections) not closed file descriptors, etc.

More important, I think, is stuff you shove inside Collections.

The RS'es, Files and all that stuff will eventually be GC'ed when they go
out of scope, that is, no reference is left for them. (IF they do, of
course).

Only way to have leaks in Java is to make objects that are in your
"working set" (reachable set) of objects and that never goes out of scope.
--> Like some caching mechanism where the only thing you do is to _add_
objects to the cache, and never release them.

-- 
Mvh,
Endre


Mime
View raw message