OpenTTD Source: src/misc/autorelease.hpp File Reference

OpenTTD Source 15.3

Data Structures | Typedefs
autorelease.hpp File Reference

Helper for std::unique_ptr to use an arbitrary function as the deleter. More...

Go to the source code of this file.

## Data Structures
struct | DeleterFromFunc< Tfunc >
| Deleter that calls a function rather than deleting the pointer. More...

## Typedefs
template<typename T , auto Tfunc>
using | AutoRelease = std::unique_ptr< T, DeleterFromFunc< Tfunc > >
| Specialisation of std::unique_ptr for objects which must be deleted by calling a function.

## Detailed Description

Helper for std::unique_ptr to use an arbitrary function as the deleter.

Definition in file autorelease.hpp.

## Typedef Documentation

## ◆ AutoRelease

template<typename T , auto Tfunc>

using AutoRelease = std::unique_ptr<T, DeleterFromFunc<Tfunc> >

Specialisation of std::unique_ptr for objects which must be deleted by calling a function.

Definition at line 25 of file autorelease.hpp.