// ReleaseSnapshot releases the snapshot and its resources.
761028
func (db *TransactionDB) ReleaseSnapshot(snapshot *Snapshot) {
	C.rocksdb_transactiondb_release_snapshot(db.c, snapshot.c)
	snapshot.c = nil
}
1340643
func (c *LayerTree) ReleaseSnapshotWithParams(v *LayerTreeReleaseSnapshotParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "LayerTree.releaseSnapshot", Params: v})
}
1113724
func (s *Store) Snapshot() *Store {
	if s.IsReadOnly() {
		return s
	}

	s.collLock.RLock()
	defer s.collLock.RUnlock()

	// Return a read-only Store with the new Collection set.
	snap := &Store{
		collLock:  nil,
		colls:     make(map[string]*Collection, len(s.colls)),
		collNames: s.collNames,
	}

	// Create a read-only Collection for each coll.
	for k, coll := range s.colls {
		newColl := &Collection{
			name: coll.name,
		}
		newColl.setRoot(coll.currentRoot())
		snap.colls[k] = newColl
	}
	return snap
}
482564
func (c *Compactor) DisableSnapshots() {
	c.mu.Lock()
	c.snapshotsEnabled = false
	if c.snapshotsInterrupt != nil {
		close(c.snapshotsInterrupt)
		c.snapshotsInterrupt = nil
	}
	c.mu.Unlock()
}
282650
func (s *SnapshotCreateService) Snapshot(snapshot string) *SnapshotCreateService {
	s.snapshot = snapshot
	return s
}
507314
func (c *CameraModel) Release() {
	C.EdsRelease((*C.struct___EdsObject)(unsafe.Pointer(&c.camera)))
}
1163933
func (s *DeleteClusterSnapshotOutput) SetSnapshot(v *Snapshot) *DeleteClusterSnapshotOutput {
	s.Snapshot = v
	return s
}
1237245
func (client *Client) DeleteSnapshot(snapshotId string) error {
	args := DeleteSnapshotArgs{SnapshotId: snapshotId}
	response := DeleteSnapshotResponse{}

	return client.Invoke("DeleteSnapshot", &args, &response)
}
782814
func NewReleaseSnapshotArgs(snapshotID SnapshotID) *ReleaseSnapshotArgs {
	args := new(ReleaseSnapshotArgs)
	args.SnapshotID = snapshotID
	return args
}
163283
func (s *SnapshotGetService) Snapshot(snapshots ...string) *SnapshotGetService {
	s.snapshot = append(s.snapshot, snapshots...)
	return s
}
408462
func (c *tufClient) downloadSnapshot() error {
	logrus.Debug("Loading snapshot...")
	role := data.CanonicalSnapshotRole
	consistentInfo := c.newBuilder.GetConsistentInfo(role)

	_, err := c.tryLoadCacheThenRemote(consistentInfo)
	return err
}
1145092
func (s *DeleteSnapshotOutput) SetSnapshot(v *Snapshot) *DeleteSnapshotOutput {
	s.Snapshot = v
	return s
}
277067
func (c *Cloud) CreateSnapshot(snapshotOptions *SnapshotOptions) (snapshotID string, status string, err error) {
	request := &ec2.CreateSnapshotInput{}
	request.VolumeId = aws.String(snapshotOptions.VolumeID)
	request.DryRun = aws.Bool(false)
	descriptions := "Created by Kubernetes for volume " + snapshotOptions.VolumeID
	request.Description = aws.String(descriptions)
	res, err := c.ec2.CreateSnapshot(request)
	if err != nil {
		return "", "", err
	}
	if res == nil {
		return "", "", fmt.Errorf("nil CreateSnapshotResponse")
	}
	if snapshotOptions.Tags != nil {
		awsID := awsVolumeID(aws.StringValue(res.SnapshotId))
		// apply tags
		if err := c.tagging.createTags(c.ec2, string(awsID), ResourceLifecycleOwned, *snapshotOptions.Tags); err != nil {
			_, delerr := c.DeleteSnapshot(*res.SnapshotId)
			if delerr != nil {
				return "", "", fmt.Errorf("error tagging snapshot %s, could not delete the snapshot: %v", *res.SnapshotId, delerr)
			}
			return "", "", fmt.Errorf("error tagging snapshot %s: %v", *res.SnapshotId, err)
		}
	}
	return *res.SnapshotId, *res.State, nil

}
574349
func (s *CopySnapshotOutput) SetSnapshot(v *Snapshot) *CopySnapshotOutput {
	s.Snapshot = v
	return s
}
358606
func (a *api) AddSnapshot(cfg SnapshotConfig) (string, error) {
	client, err := a.connectDAO()
	if err != nil {
		return "", err
	}
	req := dao.SnapshotRequest{
		ServiceID:            cfg.ServiceID,
		Message:              cfg.Message,
		Tag:                  cfg.Tag,
		ContainerID:          cfg.DockerID,
		SnapshotSpacePercent: config.GetOptions().SnapshotSpacePercent,
	}
	var snapshotID string
	if err := client.Snapshot(req, &snapshotID); err != nil {
		return "", err
	}

	return snapshotID, nil
}
1253691
func reuseSnapshot(snap Snapshot) Snapshot {
	if snap != nil {
		ss, ok := snap.(*segmentStack)
		if ok {
			ss.addRef()
			return snap
		}
	}

	return nil
}
668812
func (idx *NetworkIndex) Release() {
	for _, b := range idx.UsedPorts {
		bitmapPool.Put(b)
	}
}