Results 1 to 14 of 14

What is garbage collection?

This is a discussion on What is garbage collection? within the Programming forums, part of the Web Designing & Development category; Garbage collection is a CLR feature which automatically manages memory. Programmers forget to release the objects while coding ..... Laziness ...

  1. #1
    Senior Member chinmay.sahoo's Avatar
    Join Date
    Dec 2013
    Location
    Banglore
    Posts
    266

    Thumbs up What is garbage collection?

    Garbage collection is a CLR feature which automatically manages memory. Programmers forget to release the objects while coding ..... Laziness (Remember in VB6 where one of the good practices is to set object to nothing). CLR automatically releases objects when they are no longer in use and refernced. CLR runs on non-deterministic to see the unused objects and cleans them. One side effect of this non-deterministic feature is that we cannot assume an object is destroyed when it goes out of the scope of a function. Therefore, we should not put code into a class destructor to release resources.

  2. #2
    Member
    Join Date
    Sep 2010
    Posts
    50

    Default Re: What is garbage collection?

    In computer science, garbage collection (GC) is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage collection.

  3. #3
    Senior Member
    Join Date
    Aug 2015
    Posts
    302

    Default Re: What is garbage collection?

    garbage collection (GC) is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program. Garbage collection was invented by John McCarthy around 1959 to abstract away manual memory management in Lisp

  4. #4
    Junior Member
    Join Date
    Dec 2015
    Posts
    22

    Default Re: What is garbage collection?

    GarbageCollection is performed by a garbage collector which recycles memory that it can prove will never be used again.

  5. #5
    Senior Member
    Join Date
    Jan 2016
    Posts
    145

    Default Re: What is garbage collection?

    Hello friend,
    Garbage collection is a form of automatic memory management that attempts to reclaim garbage or the memory occupied by the objects that are not in use by the program.This frees the storage to be used by other programs.It is used in many programming languages like .NET frameworks,Java,C and many more.

  6. #6
    Junior Member
    Join Date
    Jan 2016
    Posts
    11

    Default Re: What is garbage collection?

    Garbage collection is used for deallocating the memory space occupied by objects.

  7. #7
    Senior Member
    Join Date
    Jan 2012
    Posts
    1,894

    Default Re: What is garbage collection?

    In computer science, garbage collection (GC) is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program.

  8. #8
    Senior Member pxljobs's Avatar
    Join Date
    Jul 2016
    Location
    Bangalore
    Posts
    128

    Default Re: What is garbage collection?

    These is an process of reclaim the run time unused memory automatically also this is destroy the unused objects min advantage of this process are make the memory efficient..

  9. #9
    Senior Member
    Join Date
    Nov 2016
    Posts
    152

    Default Re: What is garbage collection?

    It's a method used in java language.

  10. #10
    Senior Member
    Join Date
    May 2017
    Posts
    477

    Default Re: What is garbage collection?

    Garbage collection is often portrayed as the opposite of manual memory management, which requires the programmer to specify which objects to deallocate and return to the memory system.

  11. #11
    Senior Member
    Join Date
    Jun 2017
    Posts
    100

    Default Re: What is garbage collection?

    Garbage collection (GC) is a form of automatic memory management. The garbage collector, or justcollector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by theprogram.

  12. #12
    Senior Member charlottegracie's Avatar
    Join Date
    Jan 2017
    Posts
    207

    Default Re: What is garbage collection?

    Garbage collection is the systematic recovery of pooled computer storage that is being used by a program when that program no longer needs the storage. This frees the storage for use by other programs (or processes within a program). It also ensures that a program using increasing amounts of pooled storage does not reach its quota (in which case it may no longer be able to function).

  13. #13
    Senior Member
    Join Date
    Nov 2016
    Posts
    152

    Default Re: What is garbage collection?

    So nice ellie.

    Quote Originally Posted by Ellie View Post
    Hello friend,
    Garbage collection is a form of automatic memory management that attempts to reclaim garbage or the memory occupied by the objects that are not in use by the program.This frees the storage to be used by other programs.It is used in many programming languages like .NET frameworks,Java,C and many more.

  14. #14
    Junior Member
    Join Date
    Apr 2018
    Posts
    15

    Default Re: What is garbage collection?

    In java we create objects for the application but after a certain time, memory will be used for objects which aren't being used anymore.If this keeps going on, eventually the Java Virtual Machine will run out of space to make new objects.That's where the garbage collector steps in.It deletes objects when it determines that they are no longer being used.

Tags for this Thread