code: func (jl *Solver) deleteIfUnreferenced(k digest.Digest, st *state) {
  	if len(st.jobs) == 0 && len(st.parents) == 0 {
  		for chKey := range st.childVtx {
  			chState := jl.actives[chKey]
  			delete(chState.parents, k)
  			jl.deleteIfUnreferenced(chKey, chState)
  		}
  		st.Release()
  		delete(jl.actives, k)
  	}
  }
docs: // called with solver lock