What is the main objective of garbage collection?

Technical