# session_free

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L180
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-session-c-session_free/

```c
static void session_free(int, short, void *)
```

## Parameters

- `fd` (`int`)
- `events` (`short`)
- `arg` (`void *`)

## Calls

- [`environ_free`](/en/tmux/latest/reference/c-function-environ_free/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L187)
- [`log_debug`](/en/tmux/latest/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L184)
- [`options_free`](/en/tmux/latest/reference/c-function-options_free/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L188)

## Referenced by

- [`session_remove_ref`](/en/tmux/latest/reference/c-function-session_remove_ref/) (function)

## Referenced declarations

- [`__unused`](/en/tmux/latest/reference/c-define-compat-h-__unused/) (constant)
- [`session.environ`](/en/tmux/latest/reference/c-struct-session-environ/) (attribute)
- [`session.name`](/en/tmux/latest/reference/c-struct-session-name/) (attribute)
- [`session.options`](/en/tmux/latest/reference/c-struct-session-options/) (attribute)
- [`session.references`](/en/tmux/latest/reference/c-struct-session-references/) (attribute)
