File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Performance and the fly likes Memory Leak !! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "Memory Leak !!" Watch "Memory Leak !!" New topic
Author

Memory Leak !!

Isabel Carter
Greenhorn

Joined: Sep 26, 2001
Posts: 2
My application has a memory leak which I found using a MemoryMonitor class that came with the JDK demos
I create JComponent subclass instances and add them to a vector.
How I get rid of them is to use
Vector.remove(int index)
But as the memory keeps increasing I want to get rid of these Objects from memory and its not working.
Also what is a circular reference and how do I fix it?
(I Have a suspicion this might be a problem)
Can anyone shed any light on the subject?
What can the package java.lang.ref do for me?
any good sites?
And also what is Load Balancing?
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
ok. first of all i dont think your problem is in the vecotr. it should GC your objects once you remove them IF u dont have any more refrences to them or any containers, listeners binding to them.
circular refrence is when 2 objects when to each other but no one else it pointing to them at all. thus they are alone in the memory pointing to each other, but no one can reach either of them.
this is a problem , but one of no concern to you since the java virtual machine KNOWS to GC cirecular refernces.
as for the rest of your questions here are a few good links:
link1
link2
link3
 
 
subject: Memory Leak !!
 
Similar Threads
Proper way to exit a servlet, and release the resources it is using?
Memory Leak after repeat deploy and undeploy
Error in Struts2 application
What do you mean by memory leak in Java?
Memory leak?