# window_destroy

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

```c
static void window_destroy(struct window *w)
```

## Parameters

- `w` (`struct window *`)

## Called by

- [`window_remove_ref`](/en/tmux/3.7c/reference/c-function-window_remove_ref/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L402)

## Calls

- [`layout_free_cell`](/en/tmux/3.7c/reference/c-function-layout_free_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L352)
- [`log_debug`](/en/tmux/3.7c/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L347)
- [`options_free`](/en/tmux/3.7c/reference/c-function-options_free/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L366)
- [`window_destroy_panes`](/en/tmux/3.7c/reference/c-function-window_destroy_panes/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L356)
- [`window_unzoom`](/en/tmux/3.7c/reference/c-function-window_unzoom/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L349)

## Referenced declarations

- [`window.alerts_timer`](/en/tmux/3.7c/reference/c-struct-window-alerts_timer/) (attribute)
- [`window.fill_character`](/en/tmux/3.7c/reference/c-struct-window-fill_character/) (attribute)
- [`window.id`](/en/tmux/3.7c/reference/c-struct-window-id/) (attribute)
- [`window.layout_root`](/en/tmux/3.7c/reference/c-struct-window-layout_root/) (attribute)
- [`window.name`](/en/tmux/3.7c/reference/c-struct-window-name/) (attribute)
- [`window.name_event`](/en/tmux/3.7c/reference/c-struct-window-name_event/) (attribute)
- [`window.offset_timer`](/en/tmux/3.7c/reference/c-struct-window-offset_timer/) (attribute)
- [`window.old_layout`](/en/tmux/3.7c/reference/c-struct-window-old_layout/) (attribute)
- [`window.options`](/en/tmux/3.7c/reference/c-struct-window-options/) (attribute)
- [`window.references`](/en/tmux/3.7c/reference/c-struct-window-references/) (attribute)
- [`window.saved_layout_root`](/en/tmux/3.7c/reference/c-struct-window-saved_layout_root/) (attribute)
- [`window`](/en/tmux/3.7c/reference/c-struct-window/) (struct)
