XML Feeds

.

[java-dev] memory running wild

jbmaxwell jbmaxwell at btinternet.com
Tue Jul 17 03:43:36 MDT 2007


I seem to have created a memory leak of some kind.

I have an object, say "Link", that makes associations between two instances of another type of objects, say "Thing". Basically, I'm testing for similarity between Things, and using Links to record the similarities found. 

The Link has a constructor which takes two Things, and some analysis data indicating the ways in which they are similar. What I'm curious about is whether such a constructor would make deep copies of the two Thing objects, or just store references? The way my memory usage is spinning out of control, I'm guessing that actual copies are being made. Is there any way to check this? Is there any way to avoid this?

Thanks for any thoughts.

J.


More information about the java-dev mailing list