Assignment simulating a garbage collector