Sign Up

Continue with Facebook
Continue with Google
or use

Have an account? Sign In Now

Sign In

Continue with Facebook
Continue with Google
or use

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.

Continue with Facebook
Continue with Google
or use

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

Ansfind

Ansfind Logo Ansfind Logo Ansfind Logo Ansfind Logo
Add question

Ansfind Navigation

  • About Us
  • Groups
    • Add group
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Hot Questions
  • Polls
  • Tags
  • Points
  • Users
  • FAQs
  • Help
  • Contact Us
Manu Murthy
Manu Murthy
Asked: December 17, 20212021-12-17T11:59:47+05:30 2021-12-17T11:59:47+05:30In: Programming

When was garbage collection first implemented? What does it do? How does it work?

When was garbage collection first implemented? What does it do? How does it work?

c++java
  • 2
  • 11
  • 19
  • Share
    • Share on Facebook
    • Share on Twitter
    • Share on LinkedIn
    • Share on WhatsApp
Answer

    Related Questions

    • What are copy constructors in C++?
    • What is the difference between Shallow copy and Deep copy?
    • What is the output of the following Java program?

    1 Answer

    • Voted
    • Oldest
    • Recent
    1. James Wane
      2021-12-17T12:00:24+05:30Added an answer on December 17, 2021 at 12:00 pm

      Garbage collection was first implemented by John McCarthy in the 1960s while working on the Lisp programming language. It is used by modern JVMs to automatically free up memory space previously occupied by objects that are no longer referenced (ie “garbage”).

      Garbage collection works by examining the references between objects in a program, starting with the root(s) of your application’s reachable object graph. If an object has none of its fields pointing at it, then it is garbage and can be freed. To do this efficiently requires that garbage collectors for languages like Java or C++ have what is known as generational hypothesis: most objects die young – meaning they only live for a short amount of time before being discarded. This hypothesis allows them to focus their effort on young garbage objects, which are more likely to be garbage than older objects.

      • 2
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    Leave an answer

    Leave an answer
    Cancel reply

    Browse

    Choose from here the video type.

    Put Video ID here: https://www.youtube.com/watch?v=sdUUx5FdySs Ex: "sdUUx5FdySs".

    Sidebar

    Top Users

    Weboptify

    Weboptify

    • 3,290 Points
    Wish Lay

    Wish Lay

    • 2,369 Points
    Manu Murthy

    Manu Murthy

    • 1,635 Points

    Adv 250x250

    • About Us
    • Home
    • Communities
    • Polls
    • Tags
    • Points
    • Users
    • Help
    • Contact Us
    • Referrals
    • Policies
      • Privacy policy
      • Terms of use
    Revenue

    © 2022 Ansfind. | Designed by Weboptify

    monetization_on category home emoji_events
    search
    help

    Insert/edit link

    Enter the destination URL

    Or link to existing content

      No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.