A Garbage Collector is one mechanism for Memory Management in Computer Programming. It is based on the ground-breaking Paradigm Shift that all data will soon be garbage. Most current garbage collectors, like the one in Java, also understand that programmers and other users are not enlightened enough to recognize that Garbage-In/Garbage-Out is a synonym for computing. Hence the grabage collector only collects the garbage when no-one is looking.
Pros and Cons
Each form of Memory Management is prone to certain classes of problem. Manual forms were prone to problems like Memory Leaks or Dangling Pointers. Garbage Collection is itself prone to involvement with the Mafia and other unsavory sorts; even in the absence of racketeering, there is always the threat of a Garbage Collector strike.
One of the earliest recorded examples of Garbage Collection in computer programming was the Zork/Waste Disposal process.