# window_destroy

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L338
- **Page:** https://libtmux.org/en/tmux/3.2a/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.2a/reference/c-function-window_remove_ref/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L397)

## Calls

- [`layout_free_cell`](/en/tmux/3.2a/reference/c-function-layout_free_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L345)
- [`log_debug`](/en/tmux/3.2a/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L340)
- [`options_free`](/en/tmux/3.2a/reference/c-function-options_free/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L360)
- [`window_destroy_panes`](/en/tmux/3.2a/reference/c-function-window_destroy_panes/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L350)

## Referenced declarations

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