// Free frees the RWops structure allocated by AllocRW().
// (https://wiki.libsdl.org/SDL_FreeRW)
1959
func (rwops *RWops) Free() error {
	if rwops == nil {
		return ErrInvalidParameters
	}

	C.SDL_FreeRW(rwops.cptr())
	return nil
}
1048821
func (f *NWFilter) Free() error {
	var err C.virError
	ret := C.virNWFilterFreeWrapper(f.ptr, &err)
	if ret == -1 {
		return makeError(&err)
	}
	return nil
}
515741
func (palette *Palette) Free() {
	C.SDL_FreePalette((*C.SDL_Palette)(unsafe.Pointer(palette)))
}
264181
func (n *Note) Free() error {
	if n.ptr == nil {
		return ErrInvalid
	}
	runtime.SetFinalizer(n, nil)
	C.git_note_free(n.ptr)
	n.ptr = nil
	return nil
}
1335132
func LoadBMPRW(src *sdl.RWops) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_surface := C.IMG_LoadBMP_RW(_src)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}
1013491
func Free(n int) (ports []int, err error) {
	mu.Lock()
	defer mu.Unlock()

	if n > blockSize-1 {
		return nil, fmt.Errorf("freeport: block size too small")
	}

	// Reserve a port block
	once.Do(initialize)

	for len(ports) < n {
		port++

		// roll-over the port
		if port < firstPort+1 || port >= firstPort+blockSize {
			port = firstPort + 1
		}

		// if the port is in use then skip it
		ln, err := net.ListenTCP("tcp", tcpAddr("127.0.0.1", port))
		if err != nil {
			// log.Println("[DEBUG] freeport: port already in use: ", port)
			continue
		}
		ln.Close()

		ports = append(ports, port)
	}
	// log.Println("[DEBUG] freeport: free ports:", ports)
	return ports, nil
}
561537
func free(stmr *Stemmer) {
	if stmr.stmr != nil {
		C.sb_stemmer_delete(stmr.stmr)
		stmr.stmr = nil
	}
}
571381
func (b *Bucket) free() {
	if b.root == 0 {
		return
	}

	var tx = b.tx
	b.forEachPageNode(func(p *page, n *node, _ int) {
		if p != nil {
			tx.db.freelist.free(tx.meta.txid, p)
		} else {
			n.free()
		}
	})
	b.root = 0
}
253949
func (rwops *RWops) WriteBE32(value uint32) uint {
	if rwops == nil {
		return 0
	}
	return uint(C.SDL_WriteBE32(rwops.cptr(), C.Uint32(value)))
}
318110
func LoadMUSRW(src *sdl.RWops, freesrc int) (mus *Music, err error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_freesrc := (C.int)(freesrc)
	mus = (*Music)(unsafe.Pointer(C.Mix_LoadMUS_RW(_src, _freesrc)))
	if mus == nil {
		err = sdl.GetError()
	}
	return
}
835467
func (m *Message) Free() {
	C.nlmsg_free(m.nlm)
	m.nlm = nil
}
612071
func (result *DescribeResult) Free() {
	runtime.SetFinalizer(result, nil)
	C.git_describe_result_free(result.ptr)
	result.ptr = nil
}
927633
func (hc *halfConn) freeBlock(b *block) {
	b.link = hc.bfree
	hc.bfree = b
}
601570
func LoadTGARW(src *sdl.RWops) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_surface := C.IMG_LoadTGA_RW(_src)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}
42710
func (a *ACL) Free() error {
	acl_free, err := getSymbolPointer(a.lib.handle, "acl_free")
	if err != nil {
		return err
	}

	ret, err := C.my_acl_free(acl_free, a.a)
	if ret < 0 {
		return errwrap.Wrap(errors.New("error calling acl_free"), err)
	}

	return a.lib.close()
}
249601
func (n *NodeDevice) Free() error {
	var err C.virError
	ret := C.virNodeDeviceFreeWrapper(n.ptr, &err)
	if ret == -1 {
		return makeError(&err)
	}
	return nil
}
536660
func LoadICORW(src *sdl.RWops) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_surface := C.IMG_LoadICO_RW(_src)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}