memset memory before deleting it