PolicyBazaar interview question

Memory management in java?