Unlink a bunch of 1:n or m:n objects.

@param source The source object with reference.
@param cds The {@link org.apache.ojb.broker.metadata.CollectionDescriptor} of the relation.
@param referencesToUnlink List of referenced objects to unlink.
18752
public void unlink(Object source, CollectionDescriptor cds, List referencesToUnlink)
    {
        for(int i = 0; i < referencesToUnlink.size(); i++)
        {
            unlink(source, cds, referencesToUnlink.get(i));
        }
    }
980894
private void deleteManyToManyLinks(Many2ManyAssociation association){
        String join = association.getJoin();
        String sourceFK = association.getSourceFkName();
        new DB(metaModelLocal.getDbName()).exec("DELETE FROM " + join + " WHERE " + sourceFK + " = ?", getId());
    }
1083696
def unlink(self):
        
        links = self.registry.get(self.source)
        if self in links:
            links.pop(links.index(self))
445185
function unlink(mode, target, system, containerDef, container, out, cb) {
    logger.info('unlinking');
    out.stdout('unlinking');

    var elb = findParentELB(system, container);

    if (elb) {
      logger.info(elb, 'elb found');
      unlinkFromELB(mode, system, elb, container, out, cb);
    } else {
      logger.info('elb not found');
      cb(null, target);
    }
  }
1213455
public void clear(PhantomReference<T> reference) {
        Optional.ofNullable(registeredMap.remove(reference)).ifPresent(a -> reference.clear());
    }
1371547
public void link(Object source, CollectionDescriptor cds, List referencesToLink)
    {
        for(int i = 0; i < referencesToLink.size(); i++)
        {
            link(source, cds, referencesToLink.get(i));
        }
    }
158572
def unlink(self):
		
		self.parentNode = None
		for child in self.childNodes:
			child.unlink()
		del self.childNodes[:]
832879
protected void removeReferencingFromCache(Set<String> references) {

        if (m_jspLoader != null) {
            m_jspLoader.removeFromCache(references, false);
        }
    }
1095895
public final <T> void unbindFrom(Class<T> clazz, T object) throws ObjectNotAssociatedException {
        LifecycleManagerStore.getCurrentStore().unbind(this, clazz, object);
    }
739131
public void unlinkAll(ParaObject obj) {
		if (obj == null || obj.getId() == null) {
			return;
		}
		String url = Utils.formatMessage("{0}/links", obj.getObjectURI());
		invokeDelete(url, null);
	}
970512
async function unlink(args: Array<string>, ctx: ConfigT) {
  const packageName = args[0];

  const {[packageName]: dependency, ...otherDependencies} = ctx.dependencies;

  if (!dependency) {
    throw new CLIError(`
      Failed to unlink "${packageName}". It appears that the project is not linked yet.
    `);
  }

  const dependencies = values(otherDependencies);
  try {
    if (dependency.hooks.preulink) {
      await dependency.hooks.preulink();
    }
    unlinkDependency(
      ctx.platforms,
      ctx.project,
      dependency,
      packageName,
      dependencies,
    );
    if (dependency.hooks.postunlink) {
      await dependency.hooks.postunlink();
    }
  } catch (error) {
    throw new CLIError(
      `Something went wrong while unlinking. Reason ${error.message}`,
      error,
    );
  }

  // @todo move all these to above try/catch
  // @todo it is possible we could be unlinking some project assets in case of duplicate
  const assets = difference(
    dependency.assets,
    flatMap(dependencies, d => d.assets),
  );

  if (assets.length === 0) {
    return;
  }

  Object.keys(ctx.platforms || {}).forEach(platform => {
    const projectConfig = ctx.project[platform];
    const linkConfig =
      ctx.platforms[platform] &&
      ctx.platforms[platform].linkConfig &&
      ctx.platforms[platform].linkConfig();
    if (!linkConfig || !linkConfig.unlinkAssets || !projectConfig) {
      return;
    }

    logger.info(`Unlinking assets from ${platform} project`);
    // $FlowFixMe
    linkConfig.unlinkAssets(assets, projectConfig);
  });

  logger.info(
    `${packageName} assets has been successfully unlinked from your project`,
  );
}
1000513
public void remove() {

    if (context == null) {
      throw new IllegalStateException("link with href=" + getHref() + " can not be removed, because it's not part of a HAL resource tree");
    }

    // iterate over all links grouped by relation (because for removal we need to know the relation)
    ListMultimap<String, Link> allLinks = context.getLinks();
    for (String relation : allLinks.keySet()) {
      List<Link> links = allLinks.get(relation);

      // use an indexed for-loop, because we need to know the index to properly remove the link
      for (int i = 0; i < links.size(); i++) {
        if (links.get(i).getModel() == model) {
          context.removeLink(relation, i);
          context = null;
          return;
        }
      }
    }

    throw new IllegalStateException("the last known context resource of link with href=" + getHref() + " no longer contains this link");
  }
735135
public static void closeSafely(@Nullable Iterable<? extends CloseableReference<?>> references) {
    if (references != null) {
      for (CloseableReference<?> ref : references) {
        closeSafely(ref);
      }
    }
  }
655193
protected void unsetSsl(ServiceReference<Object> reference) {
        sslConfigurationRef.unsetReference(reference);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "sslRef unset");
        }
    }
836741
private void removeINodeFromDatanodeDescriptors(DatanodeDescriptor[] targets) {
    if (targets != null) {
      for (DatanodeDescriptor node : targets) {
        node.removeINode(this);
      }
    }
  }
118578
@Override
	public void removeByUuid(String uuid) {
		for (CPDefinitionLink cpDefinitionLink : findByUuid(uuid,
				QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpDefinitionLink);
		}
	}
312203
private void destroyConnLinks() {
        synchronized (inUse) {
            int numlinks = inUse.size();
            for (int i = 0; i < numlinks; i++) {
                inUse.removeFirst().destroy(null);
            }
        }
    }