func (alloc *Allocator) pruneOwned(ids map[string]struct{}) {
	changed := false
	for ident, d := range alloc.owned {
		if !d.IsContainer {
			continue
		}
		if _, found := ids[ident]; !found {
			for _, cidr := range d.Cidrs {
				alloc.space.Free(cidr.Addr)
			}
			alloc.debugf("Deleting old entry %s: %v", ident, d.Cidrs)
			delete(alloc.owned, ident)
			changed = true
		}
	}
	if changed {
		alloc.persistOwned()
	}
}
// For each ID in the 'owned' map, remove the entry if it isn't in the map
For each ID in the 'owned' map, remove the entry if it isn't in the map
// For each ID in the ' owned ' map remove the entry if it isn ' t in the map
func (alloc *Allocator) pruneOwned(ids map[string]struct{}) {
	changed := false
	for ident, d := range alloc.owned {
		if !d.IsContainer {
			continue
		}
		if _, found := ids[ident]; !found {
			for _, cidr := range d.Cidrs {
				alloc.space.Free(cidr.Addr)
			}
			alloc.debugf("Deleting old entry %s: %v", ident, d.Cidrs)
			delete(alloc.owned, ident)
			changed = true
		}
	}
	if changed {
		alloc.persistOwned()
	}
}
func ( alloc * Allocator ) pruneOwned ( ids map [ string ] struct { } ) { changed := false for ident , d := range alloc . owned { if ! d . IsContainer { continue } if _ , found := ids [ ident ] ; ! found { for _ , cidr := range d . Cidrs { alloc . space . Free ( cidr . Addr ) } alloc . debugf ( " " , ident , d . Cidrs ) delete ( alloc . owned , ident ) changed = true } } if changed { alloc . persistOwned ( ) } }
For each ID in the 'owned' map, remove the entry if it isn't in the map
For each ID in the ' owned ' map remove the entry if it isn ' t in the map