tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ed Gomolka" <>
Subject RE: memory leak
Date Tue, 24 Oct 2000 15:40:53 GMT
I'm sure that the following has nothing to do with the original problem
in this thread, but I have to disagree with the idea that Java doesn't
have memory leaks.

Java memory leaks are different from C++ memory leaks, but they are very
and can be a serious pain in the butt.
The easiest way I've found to have a memory leak is by forgetting to dispose
an object when doing GUI work.
For example:
- creating a Graphics instance, and not disposing of it
- exiting a Window without disposing of it
Another way is by retaining some sort of indirect reference to an object
that is no longer
For example:
- If you use MediaTracker to load a bunch of images, and then try to dispose
of the
images, the memory won't be freed up until the MediaTracker instance is
disposed of.

> -----Original Message-----
> From: Stubenrauch,Andreas []
> Sent: Tuesday, October 24, 2000 4:31 AM
> To: ''
> Subject: RE: memory leak
> You can't have a traditional "memory leak" in Java. But you can
> create more
> Objects than the is able to destroy. Under Linux your upper

View raw message