---
name: "destroy_gfx_mode_list"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/destroy_gfx_mode_list/3alleg4"
---

# destroy\_gfx\_mode\_list(3alleg4)

Frees the list created by get\_gfx\_mode\_list(). Allegro game programming library.

## NAME

destroy\_gfx\_mode\_list - Frees the list created by get\_gfx\_mode\_list(). Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**void destroy\_gfx\_mode\_list(GFX\_MODE\_LIST \*mode\_list);**

## DESCRIPTION

Removes the mode list created by get\_gfx\_mode\_list() from memory. Use this once you are done with the generated mode list to avoid memory leaks in your program.

## SEE ALSO

**get\_gfx\_mode\_list**(3alleg4), **set\_gfx\_mode**(3alleg4), **set\_color\_depth**(3alleg4)
