Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Does garbage collection guarantee that a program will not
run out of memory?

Answer Posted / ranganathkini

Garbage Collection of Java is an automatic mechanism that
safeguards against memory leaks and handles memory
allocation and de-allocation.

The GC makes all possible attempts to free memory and make
it available for fresh allocations. But at certain times it
cannot. At those times, it throws an OutOfMemoryError.

So to conclude, GC handles most of the memory management and
makes all possible attempts to make memory availabe for the
application but it does not gurantee that it will be able to
provide it.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is the marker interface used in Java?

1052


What is the difference between hashmap and hashtable? What is an interface?

1096


Can we overload the main() method?

998


What is r * in math?

944


How do you create a reference in java?

930


Differentiate between stringbuffer and stringbuilder in java.

989


What is the default value of float and double datatype in java?

967


Will the compiler creates a default constructor if I have a parameterized constructor in the class?

1066


Explain the difference between throw and throws in java?

959


Why can't you declare a class as protected?

1073


What programs use java?

891


How are variables stored in memory?

1014


What is static data type in java?

997


Can we serialize singleton class?

995


When a byte datatype is used?

2101