views:

117

answers:

3

Can any one let me where the memory leaks can happen when we are developing Java based application.

I am aware of Database but apart from that, is there any other possible ways . Please list the scenarios

A: 

Are you currently experiencing memory-leak symptoms? If so, what are they?

There are several ways Java's garbage collector can be tricked into keeping garbage around in memory. However, the only way to be really sure where and how such things occurs is by empirically measuring your memory usage. Depending on your tools, you might already have a heap profiler handy.

troutwine
@troutwine, This was an interview question to me, where I explained abuot the database opne connections, he was asking is there any more leakage scenario, so i was wondering for any possibilities
harigm
+1  A: 

Take a look at Troubleshooting Memory Leaks

Boris Pavlović
+1  A: 

Take a look at Memory leaks traps in the Java Standard API
or
Take a look at Common Java memory/reference leak patterns?

Did you do any searching by yourself already? It is generally a good idea, to search a bit yourself before asking such a question.

Matthijs Wessels
@Matthij, I have searched and I have got good links, but I dont get any practical experience from the great coders, this is What I get in Stackoverflow.I hope you marked me negative, Now i think you got why i asked here?please change it
harigm
@harigm, sorry pal, I'm not the one who marked you negative :). I can understand why someone would do it though. Your question is two and a half sentence long and after two seconds of searching , you can already find some answers (even on stackoverflow). It doesn't give the impression that you have spent any effort yourself on this. My suggestion is to list all your findings in your question, or in an answer to your own question. But then again, what is the big difference between this question/thread and the two questions I linked in my answer? I think I can just copy those answers to the one.
Matthijs Wessels