Garbage collection is a method that makes use of special routine to as to find all the garbage nodes and to add them to the list of free nodes.