# window_destroy_panes

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L785
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-window_destroy_panes/

```c
void window_destroy_panes(struct window *w)
```

## Parameters

- `w` (`struct window *`)

## Called by

- [`spawn_window`](/en/tmux/3.2a/reference/c-function-spawn_window/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/spawn.c#L110)
- [`window_destroy`](/en/tmux/3.2a/reference/c-function-window-c-window_destroy/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L350)

## Calls

- [`window_pane_destroy`](/en/tmux/3.2a/reference/c-function-window-c-window_pane_destroy/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L792)

## Referenced by

- [`server_client_push_stderr`](/en/tmux/3.2a/reference/c-function-server_client_push_stderr/) (function)

## Referenced declarations

- [`window_pane.entry`](/en/tmux/3.2a/reference/c-struct-window_pane-entry/) (attribute)
- [`window.panes`](/en/tmux/3.2a/reference/c-struct-window-panes/) (attribute)
- [`window`](/en/tmux/3.2a/reference/c-struct-window/) (struct)
