# tty_free

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L522
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-tty_free/

```c
void tty_free(struct tty *tty)
```

## Parameters

- `tty` (`struct tty *`)

## Called by

- [`server_client_lost`](/en/tmux/3.7c/reference/c-function-server_client_lost/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L466)

## Calls

- [`tty_close`](/en/tmux/3.7c/reference/c-function-tty_close/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L524)

## Referenced declarations

- [`tty.r`](/en/tmux/3.7c/reference/c-struct-tty-r/) (attribute)
- [`visible_ranges.ranges`](/en/tmux/3.7c/reference/c-struct-visible_ranges-ranges/) (attribute)
- [`tty`](/en/tmux/3.7c/reference/c-struct-tty/) (struct)
