cleanup on logic, synchronize outstanding_handlers and deallocated-offs