The garbage collector is a mechanism to manage your programs memory so it returns it after you used it to store values. That way you don't have to manage it yourself. In order to see if the memory can be claimed back, it needs to stop everything for a small moment. These pauses also stop animation, causing dropped frames, or stutters.