Set destroyed property when destroyed.