# _CP_release

_CP_release is equivalent to the `release *expression*,*string*` BASIC statement.

## Syntax

```
int _CP_release(int expression, CPSTR* string)
```

## Parameter(s)

| expression | Should be an integer file descriptor returned by the _CP_open call. |
| --- | --- |

## Description

This function returns -1 if
an error occurs. The error code is contained in _CP_errno.

## Example(s)

```
/* Releases a previously set item lock on item "1" in "myfile". */

CPSTR * s = _CP_mkstr("myfile");
CPSTR * t = _CP_mkstr("1");
int f;

_CP_open(&f,_CP_str_null,s);
_CP_release(f,t);
```

## See also

- [C functions overview](https://d3codex.com/cfunctions/c-functions-overview/)

---
Source: https://d3codex.com/cfunctions/cp-release/ - part of the D3Codex reference.
