What is the primary difference between Java and C regarding memory management?
Java has automatic memory management via garbage collection, while C requires manual memory management using malloc and free.
Great! You've understood the main difference in memory management between Java and C.
Can you explain what could happen if memory is not properly freed in C?