This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Memory Leakage

 
Vallabhaneni Suresh Kumar
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is memory leakage possible in Java? If yes, can you describe a case in which memory leaks may occur, and what is the way to avoid that?

Thank you
 
Tony Morris
Ranch Hand
Posts: 1608
 
Mahesh Pinnamaneni
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
as i have heard that Memory Leakage occures majorly applies to external resources like sockets or database connections etc..
But i didn't understand whether there is a chance of memory leakage due to un referenced objects in the memory which are not garbage collected?
if YES, then how to handle these kind of problems.
can any one give me an example to show how mem leake happens in case of objects.
thanks alot,
--Mahesh
 
Norm Radder
Bartender
Posts: 1362
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An example would be adding a listener and not removing it when its not needed or used or has been replaced by a new one
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic