Garbage collector will allocate and deallocate memory for each process joining and leaving. Also, keep a track of generations of thread.