Clearing data after closing