---
name: "idr_remove_all"
section: "9"
platform: "linux"
package: "linux-manual-3.2"
version: "3.2.78-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/idr_remove_all"
---

# idr\_remove\_all(9)

remove all ids from the given idr tree

## NAME

idr\_remove\_all - remove all ids from the given idr tree

## SYNOPSIS

**void idr\_remove\_all(struct idr \*** *idp***);**

## ARGUMENTS

*idp*

idr handle

## DESCRIPTION

**idr\_destroy** only frees up unused, cached idp\_layers, but this function will remove all id mappings and leave all idp\_layers unused.

A typical clean-up sequence for objects stored in an idr tree will use **idr\_for\_each** to free all objects, if necessay, then **idr\_remove\_all** to remove all ids, and **idr\_destroy** to free up the cached idr\_layers.

## COPYRIGHT
