• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Memory Leakage

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can Java applications leak memory?
http://jqa.tmorris.net/faq/GetQAndA.action?qids=38&showAnswers=true
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 5008
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic