---
name: "freebsd::nvlist_up"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/freebsd::nvlist_up"
---

# freebsd::nvlist\_up(3)

std::unique\_ptr specialization for name/value pairs

## NAME

**freebsd::nvlist\_up** – std::unique\_ptr specialization for name/value pairs

## LIBRARY

library “libutil++”

## SYNOPSIS

**#include \<libutil++.hh\>**

*using* *nvlist\_up* *=* *std::unique\_ptr\<nvlist,* *nvlist\_deleter\>;*\

## DESCRIPTION

This class is a specialization of *std::unique\_ptr* for *nvlist\_t* objects. When an *nvlist\_t* object managed by an instance of this class is disposed, nvlist\_destroy(3) is invoked to dispose of the object.

## EXAMPLES

```
freebsd::nvlist_up nvl(nvlist_create(0));
nvlist_add_number(nvl.get(), "answer", 42);
nvlist_add_bool(nvl.get(), "valid", true);
// `nvl' is implicitly destroyed
```

## SEE ALSO

nvlist\_destroy(3)
