What is meant by a resource leak ?

What is meant by a resource leak ?

A resource leak is where memory is being steadily consumed by resources that are no longer being used. In java this situation arises when references to objects that are no longer required.  To avoid this you should remember to set all variables to null as soon as you are finished with the reference. This will allow the gc to free up the memory that the objects were consuming. 

Date:2014-01-09 00:00:00

Post Your Answers

User Email:

User Name:

Related Java Subjective Links

Java Subjective interview questions and answers for experienced and fresher