### Method

# GLib Dir close

#### Declaration

    void
    g_dir_close (
      GDir* dir
    )

#### Description

Closes the directory immediately and decrements the reference count.

Once the reference count reaches zero, the `GDir` structure itself will be freed. Prior to GLib 2.80, `GDir` was not reference counted.

It is an error to call any of the `GDir` methods other than `g_dir_ref()` and `g_dir_unref()` on a `GDir` after calling `g_dir_close()` on it.