---
name: "al_unref_user_event"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/al_unref_user_event"
---

# al\_unref\_user\_event(3)

Allegro 5 API

## NAME

al\_unref\_user\_event - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  void al_unref_user_event(ALLEGRO_USER_EVENT *event)
  ```

## DESCRIPTION

Decrease the reference count of a user-defined event. This must be called on any user event that you get from [al\_get\_next\_event(3)](/al_get_next_event/3.md), [al\_peek\_next\_event(3)](/al_peek_next_event/3.md), [al\_wait\_for\_event(3)](/al_wait_for_event/3.md), etc. which is reference counted. This function does nothing if the event is not reference counted.

## SEE ALSO

[al\_emit\_user\_event(3)](/al_emit_user_event/3.md), [ALLEGRO\_USER\_EVENT(3)](/ALLEGRO_USER_EVENT/3.md)
