Results 1 to 4 of 4

Thread: What are the two kinds of Garbage Collectors for C++?

  1. #1
    Join Date
    Sep 2009
    Posts
    177

    What are the two kinds of Garbage Collectors for C++?

    I am a new learner of C++. I am not that good at programming. I am confused over the Garbage Collectors in C++. I am finding it difficult to understand Garbage Collectors. Also I have read there are two types of Garbage collectors in C++. Can anyone explain to me what are the two kinds of Garbage Collectors.

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    Re: What are the two kinds of Garbage Collectors for C++?

    There are two types of Garbage Collectors in C++:
    > Conservative Garbage Collectors.
    > Hybrid Garbage Collectors.

    Conservative Garbage Collectors:
    They have almost negligible knowledge of the layout of the stack of of C++ objects. They only search for the bit patterns that appear to be pointers.

    Hybrid Garbage Collectors:
    They require the programmer to provide the layout information for heap objects. But they scan the stack conservatively.

  3. #3
    Join Date
    Oct 2005
    Posts
    2,393

    Re: What are the two kinds of Garbage Collectors for C++?

    C++ is really a very logical programming language. You need to be logically thoughtful to successfully learn C++. To put into simpe words, Garbage Collection is a form of automatic memory management. A garbage collector is very helpful, since it eliminates a big source for bugs, memory leaks and runtime crashes. Garbage collection can make programmers more productive by removing some programming load on theseprogrammers in much the same way that high-level languages remove loads that assembly language does not.

  4. #4
    Join Date
    May 2008
    Posts
    2,389

    Re: What are the two kinds of Garbage Collectors for C++?

    Garbage collection was invented by John McCarthy around 1959. The garbage collector aim at collecting memory occupied by objects that are no longer in use by the program. One very important aspect of Garbage Collection are dangling pointer bugs, which occur when a piece of memory is made free while there are still pointers to it, and one of those pointers is then used. Garbage Collection causes additional overhead for repeated operations like compaction, reference counting, and memory initialization. C++ also supports these Garbage Collectors

Similar Threads

  1. Replies: 2
    Last Post: 29-05-2012, 07:04 PM
  2. What are the different kinds of computers?
    By Tau-Mai in forum Hardware Peripherals
    Replies: 8
    Last Post: 29-12-2011, 05:34 AM
  3. Will there be any collectors edition for Stronghold 3
    By Kumar esan in forum Video Games
    Replies: 8
    Last Post: 28-10-2011, 05:56 PM
  4. Limited & collectors edition of Dead island
    By akkiiii in forum Video Games
    Replies: 2
    Last Post: 06-09-2011, 11:45 PM
  5. Dead Space 2 Collectors Edition Unboxing
    By Wyvern in forum Video Games
    Replies: 4
    Last Post: 25-01-2011, 07:26 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,710,829,040.36858 seconds with 16 queries