answersLogoWhite

0

How garbage is collected?

Updated: 8/10/2023
User Avatar

Wiki User

13y ago

Best Answer

Yes, GC can be considered as a JVM utility that checks the status of memory objects and cleans up all unused memory references so that, this memory can be used by other objects.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

C and C++ do not have a built in garbage collection. Garbage is not collected.

There are libraries that will impliment garbage collection for C and C++

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

My guess is better than yours: I don't know, I don't want to know, and I don't need to know.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How garbage is collected?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering
Related questions

What is mean by garbage collected?

Garbage collected means that the memory used by an object has been reclaimed by the garbage collector.


What is mean by garbage?

Garbage collected means that the memory used by an object has been reclaimed by the garbage collector.


Where does the garbage goes after the end of the day?

The garbage that has been collected goes into a landfill at the end of the day.


Who are famous people who have a garbage collection?

Everyone in the world has a garbage collection and really does not matter if you are famous or not. To not have your garbage collected would be consider unsanitary to some and hoarding to others.


Are you supposed to put your trash cans out the night before garbage is collected?

yes


What are the disposal sites where garbage is collected and is eventually piled up called?

Landfill.


What are the condition which can cause an object to be garbage collected?

A Java object is ready to be garbage collected if there are no active references to the object. Let us say you declare an object of type ArrayList inside a for loop and process it. That object is local to the for loop and once the loop is executed there are no open references to the array list. Hence after the method is executed this object would be eligible to be garbage collected. The JVM garbage collector would search for such unused/unreferenced objects and clear them.


What are destructor in java?

Destructors in Java are called finalizers. Every class can define a finalize() method that will get called automatically by the garbage-collector when an instance of the class gets garbage-collected. Finalizers are not guaranteed to get called, as the instance might never get collected.


How the garbage is disposed off?

This is done in different ways in different countries. It can be burned, recycled or ground down and then buried, or simply buried in municipal garbage pits. Organic waste can be collected in special bags. Inorganic waste needs to be collected separately.


When does Charlie Lucas usually go searching for his found objects and salvaged materials?

The day before the garbage is collected. :)_)))


What time is the garbage from your house taken?

It depends where you are !... In my part of the UK - ours is collected around 7:30am every Friday.


How much money does a garbage collector earnhttpwikianswerscomQHow much money does a garbage collector earn?

I think they pay $150.00000 billions dOLLARS. for every garbages because that they can get pay these people who collected the garbages for us.