Introduction
Garbage collection helps clean up memory by removing data no longer needed. Array references let you share or copy data without extra memory use.
When you want to avoid using extra memory by sharing the same array in different parts of your program.
When you want to make a copy of an array to change it without affecting the original.
When you want to understand why changing one array also changes another.
When you want to make sure unused arrays are removed to free memory.