Board index » jbuilder » Can you have a memory leak in Java?

Can you have a memory leak in Java?


2004-04-28 10:58:47 PM
jbuilder6
I've got a problem in which the customer is talking about a memory leak in a
Java program.
Since I am a C++ programmer I am going to ask some novice questions:
- How can you have a leak in your Java program, since you have the garbage
collector in Java, and you do not have to release anything as in C++?
- How could I check if in a Java program there is a leak. How do you notice
such a problem? In C++ you have tracking builds and you can monitor the
memory use of an exe. How would you do that in Java?
Martin
 
 

Re:Can you have a memory leak in Java?

Mar wrote:
Quote
- How can you have a leak in your Java program, since you have the garbage
collector in Java, and you do not have to release anything as in C++?

- How could I check if in a Java program there is a leak. How do you notice
such a problem? In C++ you have tracking builds and you can monitor the
memory use of an exe. How would you do that in Java?
Search for "java memory leak" with Google and tell it you're feeling
lucky. The first hit is an excellent paper on memory leaks in Java.
--
Gillmer J. Derge (TeamB)
 

Re:Can you have a memory leak in Java?

"Gillmer J. Derge (TeamB)" < XXXX@XXXXX.COM >wrote
Quote
Search for "java memory leak" with Google and tell it you're feeling
lucky. The first hit is an excellent paper on memory leaks in Java.
This one?
www-106.ibm.com/developerworks/java/library/j-leaks/
 

{smallsort}

Re:Can you have a memory leak in Java?

Mar wrote:
Quote
This one?

www-106.ibm.com/developerworks/java/library/j-leaks/
Yes. That looks like it answers both of your questions plus a whole lot
more.
--
Gillmer J. Derge (TeamB)