---
name: "destroy_gfx_mode_list"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/destroy_gfx_mode_list"
---

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

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**(3alleg)](/get_gfx_mode_list/3alleg.md), [**set\_gfx\_mode**(3alleg)](/set_gfx_mode/3alleg.md), [**set\_color\_depth**(3alleg)](/set_color_depth/3alleg.md)
