1. Garbage Collection in software development simply means reclaiming resources used by data objects that can no longer be accessed. For example, if pointer A points to the address of an array and then points to another location without first deleting the array, then the array will forever take up a chunk of memory until the system is shut down. Garbage collection deletes such objects to reduce memory leaks.
2. Garbage collection in Solid State Drives (SSD) is the consolidation of useful data and separating it from garbage data. The operation is carried out by the SSD controller when the SSD is either active or idle depending on the implementation. By keeping valid data blocks separate from ones marked as re-writable, the SSD can maintain its peak performance for longer since blocks that are readily available are easier to find.