// removeShapeRef removes the shape reference from its target shape. If the
// reference was the last reference to the target shape, the shape will also be
// removed.
774427
func (a *API) removeShapeRef(ref *ShapeRef) {
	if ref.Shape == nil {
		return
	}

	ref.Shape.removeRef(ref)
	if len(ref.Shape.refs) == 0 {
		a.removeShape(ref.Shape)
	}
}
822476
func RemoveToLastF(Len int, Less func(i, j int) bool, Swap func(i, j int), i int) {
	n := Len - 1
	if n != i {
		Swap(i, n)
		heapDown(n, Less, Swap, i)
		heapUp(Less, Swap, i)
	}
}
1196508
func (c *Client) RemoveProxy() *Client {
	transport, err := c.getTransport()
	if err != nil {
		c.Log.Printf("ERROR %v", err)
		return c
	}
	c.proxyURL = nil
	transport.Proxy = nil
	return c
}
1152733
func (b *BlockServerMemory) RemoveBlockReferences(ctx context.Context,
	tlfID tlf.ID, contexts kbfsblock.ContextMap) (
	liveCounts map[kbfsblock.ID]int, err error) {
	if err := checkContext(ctx); err != nil {
		return nil, err
	}

	defer func() {
		err = translateToBlockServerError(err)
	}()
	b.log.CDebugf(ctx, "BlockServerMemory.RemoveBlockReference "+
		"tlfID=%s contexts=%v", tlfID, contexts)
	liveCounts = make(map[kbfsblock.ID]int)
	for id, idContexts := range contexts {
		count, err := b.removeBlockReference(tlfID, id, idContexts)
		if err != nil {
			return nil, err
		}
		liveCounts[id] = count
	}
	return liveCounts, nil
}
424208
func (d *eventDispatcher) RemoveEventListener(typ string, listener EventListener) {
	d.Lock()
	defer d.Unlock()

	// Grab a reference to the function pointer once.
	ptr := reflect.ValueOf(listener).Pointer()

	// Find listener by pointer and remove it.
	listeners := d.listeners[typ]
	for i, l := range listeners {
		if reflect.ValueOf(l).Pointer() == ptr {
			d.listeners[typ] = append(listeners[:i], listeners[i+1:]...)
		}
	}
}
1243745
func (client *BaseClient) RemoveFilterByIndex(index int) Client {
	client.filterManager.RemoveFilterByIndex(index)
	return client
}
289088
func RemoveChild(o *js.Object, co ...*js.Object) {
	for _, onode := range co {
		o.Get("parentNode").Call("removeChild", onode)
	}
}
262114
func (r *noneEndpointReconciler) RemoveEndpoints(serviceName string, ip net.IP, endpointPorts []corev1.EndpointPort) error {
	return nil
}
31243
func (api *Client) RemoveStar(channel string, item ItemRef) error {
	return api.RemoveStarContext(context.Background(), channel, item)
}
140283
func (c *Client) RemoveFromLoadBalancerRule(p *RemoveFromLoadBalancerRuleParameter) (*Result, error) {
	obj, err := c.Request("removeFromLoadBalancerRule", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Result), err
}
75244
func (a *API) writeShapeNames() {
	for n, s := range a.Shapes {
		s.API = a
		s.ShapeName = n
	}
}
751106
func (h *HTML) removeChildren(prevChildren []ComponentOrHTML) {
	for _, prevChild := range prevChildren {
		if prevChildList, ok := prevChild.(KeyedList); ok {
			// Previous child was a list, so remove all DOM nodes in it.
			prevChildList.remove(h)
			continue
		}
		prevChildRender := extractHTML(prevChild)
		if prevChildRender == nil {
			continue
		}
		h.removeChild(prevChildRender)
	}
}
941232
func (ref *Reference) Remove() error {
	_, err := ref.invokeRequest(http.MethodDelete, nil)
	if err != nil {
		return err
	}
	return nil
}
842927
func RemoveFromGCDeleteRange(ctx sessionctx.Context, jobID, elementID int64) error {
	sql := fmt.Sprintf(completeDeleteRangeSQL, jobID, elementID)
	_, err := ctx.(sqlexec.SQLExecutor).Execute(context.TODO(), sql)
	return errors.Trace(err)
}
773065
func RemovePtrFromType(t interface{}) reflect.Type {
	var v reflect.Type
	if rt, isType := t.(reflect.Type); isType {
		v = rt
	} else {
		v = reflect.TypeOf(t)
	}
	for v.Kind() == reflect.Ptr {
		v = v.Elem()
	}
	return v
}
1322246
func (bh *Header) RemoveReference(r *Reference) error {
	if r.id < 0 || int(r.id) >= len(bh.refs) || bh.refs[r.id] != r {
		return errInvalidReference
	}
	bh.refs = append(bh.refs[:r.id], bh.refs[r.id+1:]...)
	for i := range bh.refs[r.id:] {
		bh.refs[i+int(r.id)].id--
	}
	r.id = -1
	delete(bh.seenRefs, r.name)
	return nil
}
303802
func (client *Client) DeleteIsolationSegment(guid string) (Warnings, error) {
	request, err := client.newHTTPRequest(requestOptions{
		RequestName: internal.DeleteIsolationSegmentRequest,
		URIParams:   map[string]string{"isolation_segment_guid": guid},
	})
	if err != nil {
		return nil, err
	}

	var response cloudcontroller.Response
	err = client.connection.Make(request, &response)
	return response.Warnings, err
}