# layout_free

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

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

## Parameters

- `w` (`struct window *`)

## Called by

- [`layout_set_even`](/en/tmux/3.7c/reference/c-function-layout-set-c-layout_set_even/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-set.c#L153)
- [`layout_set_main_h`](/en/tmux/3.7c/reference/c-function-layout-set-c-layout_set_main_h/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-set.c#L259)
- [`layout_set_main_h_mirrored`](/en/tmux/3.7c/reference/c-function-layout-set-c-layout_set_main_h_mirrored/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-set.c#L361)
- [`layout_set_main_v`](/en/tmux/3.7c/reference/c-function-layout-set-c-layout_set_main_v/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-set.c#L463)
- [`layout_set_main_v_mirrored`](/en/tmux/3.7c/reference/c-function-layout-set-c-layout_set_main_v_mirrored/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-set.c#L565)
- [`layout_set_tiled`](/en/tmux/3.7c/reference/c-function-layout-set-c-layout_set_tiled/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-set.c#L651)
- [`spawn_window`](/en/tmux/3.7c/reference/c-function-spawn_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/spawn.c#L107)
- [`window_unzoom`](/en/tmux/3.7c/reference/c-function-window_unzoom/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L758)

## Calls

- [`layout_free_cell`](/en/tmux/3.7c/reference/c-function-layout_free_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L610)

## Referenced declarations

- [`window.layout_root`](/en/tmux/3.7c/reference/c-struct-window-layout_root/) (attribute)
- [`window`](/en/tmux/3.7c/reference/c-struct-window/) (struct)
