# grid_destroy

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

```c
void grid_destroy(struct grid *gd)
```

## Parameters

- `gd` (`struct grid *`)

## Called by

- [`screen_alternate_off`](/en/tmux/latest/reference/c-function-screen_alternate_off/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen.c#L756)
- [`screen_free`](/en/tmux/latest/reference/c-function-screen_free/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen.c#L163)

## Calls

- [`grid_free_lines`](/en/tmux/latest/reference/c-function-grid-c-grid_free_lines/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L335)

## Referenced declarations

- [`grid`](/en/tmux/latest/reference/c-struct-grid/) (struct)
- [`grid.hsize`](/en/tmux/latest/reference/c-struct-grid-hsize/) (attribute)
- [`grid.linedata`](/en/tmux/latest/reference/c-struct-grid-linedata/) (attribute)
- [`grid.sy`](/en/tmux/latest/reference/c-struct-grid-sy/) (attribute)
