code: func (m *ManagerImpl) updateAllocatedDevices(activePods []*v1.Pod) {
  	if !m.sourcesReady.AllReady() {
  		return
  	}
  	m.mutex.Lock()
  	defer m.mutex.Unlock()
  	activePodUids := sets.NewString()
  	for _, pod := range activePods {
  		activePodUids.Insert(string(pod.UID))
  	}
  	allocatedPodUids := m.podDevices.pods()
  	podsToBeRemoved := allocatedPodUids.Difference(activePodUids)
  	if len(podsToBeRemoved) <= 0 {
  		return
  	}
  	klog.V(3).Infof("pods to be removed: %v", podsToBeRemoved.List())
  	m.podDevices.delete(podsToBeRemoved.List())
  	// Regenerated allocatedDevices after we update pod allocation information.
  	m.allocatedDevices = m.podDevices.devices()
  }
docs: // updateAllocatedDevices gets a list of active pods and then frees any Devices that are bound to
  // terminated pods. Returns error on failure.