Can anyone explain to me this garbage collection.
Simply put: by going through the link schedule and looking at which nodes the links are listed. Other objects (those that are not listed) are considered garbage, and therefore they are marked as suitable for garbage collection.