// Release indicates an expected call of Release
184702
func (mr *MockLockMockRecorder) Release() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Release", reflect.TypeOf((*MockLock)(nil).Release))
}
317193
func (device *Device) Release() {
	C.cairo_device_release(device.Ptr)
	if err := device.status(); err != nil {
		panic(err)
	}
}
658475
func (db *Database) Release(sid string) {
	// clear all $sid-$key.
	db.Clear(sid)
	// and remove the $sid.
	db.redis.Delete(sid)
}
321079
func (p *Pool) Release(conn *Conn) {
	if conn == nil {
		return
	}
	p.mutex.Lock()
	defer p.mutex.Unlock()
	if p.closed {
		return
	}
	go p.pushBack(conn)
}
704213
func (d Delivery) Release(delivered bool) {
	if delivered {
		d.SettleAs(Modified)
	} else {
		d.SettleAs(Released)
	}
}
450168
func (b *ByteBuf) Release() {
	b.pool.Free(b.buf)
	b.buf = nil
}
96703
func (a *Allocator) Release(ctx context.Context, key AllocatorKey) (lastUse bool, err error) {
	log.WithField(fieldKey, key).Info("Releasing key")

	select {
	case <-a.initialListDone:
	case <-ctx.Done():
		return false, fmt.Errorf("release was cancelled while waiting for initial key list to be received: %s", ctx.Err())
	}

	k := key.GetKey()
	// release the key locally, if it was the last use, remove the node
	// specific value key to remove the global reference mark
	lastUse, err = a.localKeys.release(k)
	if err != nil {
		return
	}

	if lastUse {
		valueKey := path.Join(a.valuePrefix, k, a.suffix)
		if err := kvstore.Delete(valueKey); err != nil {
			log.WithError(err).WithFields(logrus.Fields{fieldKey: key}).Warning("Ignoring node specific ID")
		}

		// if a.lockless {
		// FIXME: etcd 3.3 will make it possible to do a lockless
		// cleanup of the ID and release it right away. For now we rely
		// on the GC to kick in a release unused IDs.
		// }
	}

	return
}
1228260
func (c *Client) Release(acknowledgement dhcp4.Packet) error {
	release := c.ReleasePacket(&acknowledgement)
	release.PadToMinSize()

	return c.SendPacket(release)
}
452121
func (d *DeviceMapperDriver) Release(volumeName string) error {
	glog.V(2).Infof("Release() (%s) START", volumeName)
	defer glog.V(2).Infof("Release() (%s) END", volumeName)
	vol, err := d.getVolume(volumeName, false)
	if err != nil {
		return err
	}
	if mounted, _ := devmapper.Mounted(vol.Path()); mounted {
		glog.V(1).Infof("Unmounting %s", volumeName)
		if err := vol.unmount(); err != nil {
			glog.Errorf("Error whilst unmounting %s: %s", vol.path, err)
			return err
		}
	}
	deviceHashes := vol.Metadata.ListDevices()
	for _, deviceHash := range deviceHashes {
		if deviceHash == "" {
			// this can happen when all previously active devices have been deactivated
			continue
		}

		// Perversely, DeactivateDevice() will not actually work unless the device is activated.
		// GetDeviceStatus() will both verify that device is valid, and it has the side-effect of activating
		// the device if the device is not active.
		if status, err := d.DeviceSet.GetDeviceStatus(deviceHash); err != nil {
			glog.Errorf("For volume %s, unable to get status for device %q: %s", volumeName, deviceHash, err)
			continue
		} else if status == nil {
			glog.V(2).Infof("For volume %s, no status available for device %q", volumeName, deviceHash)
		} else {
			glog.V(2).Infof("For volume %s, status for device %q: %v", volumeName, deviceHash, status)
		}

		glog.V(1).Infof("Deactivating device (%s)", deviceHash)
		d.DeviceSet.Lock()
		err := d.DeactivateDevice(deviceHash)
		d.DeviceSet.Unlock()
		if err != nil {
			glog.Errorf("Error removing device %q for volume %s: %s", deviceHash, volumeName, err)
			return err
		}
		glog.V(2).Infof("Deactivated device")
	}
	return nil
}
122766
func (r *Allocator) Release(block uid.Block) error {
	ok, offset := r.contains(block)
	if !ok {
		// TODO: log a warning
		return nil
	}

	return r.alloc.Release(int(offset))
}
8182
func (s *Sem) Release(n int64) {
	s.c.L.Lock()
	defer s.c.L.Unlock()
	debug.Printf("Release max %d free %d, n %d", s.max, s.free, n)
	s.free += n
	s.c.Broadcast()
}
930586
func (b *packetBuffer) Release() {
	b.Decrement()
	if b.refCount != 0 {
		panic("packetBuffer refCount not zero")
	}
	b.putBack()
}
466777
func (c *ClientContext) Release() error {
	if c == nil {
		return nil
	}
	return c.sctxt.Release()
}
820966
func (ref *Reference) Release() {
	ref.once.Do(func() {
		live.untrack(ref)
		ref.wg.Done()
	})
}
586276
func (db *Database) Release(sid string) {
	// clear all $sid-$key.
	db.Clear(sid)
	// and remove the $sid.
	txn := db.Service.NewTransaction(true)
	txn.Delete([]byte(sid))
	txn.Commit(nil)
}
78671
func (e *ClientExecutor) Release() []error {
	errs := e.Volumes.Release()
	for _, fn := range e.Deferred {
		if err := fn(); err != nil {
			errs = append(errs, err)
		}
	}
	e.Deferred = nil
	return errs
}
811031
func (snap *Snapshot) Release() {
	snap.mu.Lock()
	defer snap.mu.Unlock()

	if !snap.released {
		// Clear the finalizer.
		runtime.SetFinalizer(snap, nil)

		snap.released = true
		snap.db.releaseSnapshot(snap.elem)
		atomic.AddInt32(&snap.db.aliveSnaps, -1)
		snap.db = nil
		snap.elem = nil
	}
}