finish RemoveReferenceMap.