To Swap the memory from heap to place a new object in the heap,by garbage collector ,finalize method called.the finalize method simply swap the memory by objects refernces and memory i heap gets compacted to poin the new memory locaion by pointer.
Loading
