Removes mutable data and connection when completed.