Detach method.