Forums Register Login

Memory Leak !!

+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
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
It's never done THAT before. Explain it to me tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 755 times.
Similar Threads
Error in Struts2 application
Proper way to exit a servlet, and release the resources it is using?
What do you mean by memory leak in Java?
Memory Leak after repeat deploy and undeploy
Memory leak?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 23:09:41.