c++-gtk-utils
Public Member Functions | List of all members
Cgu::GerrorFree Class Reference

A deleter functor for use as the second (Dealloc) template parameter of the SharedHandle, SharedLockHandle or ScopedHandle template classes, which calls glib's g_error_free(). More...

#include <c++-gtk-utils/gerror_handle.h>

Public Member Functions

void operator() (const GError *obj_p) noexcept
 

Detailed Description

A deleter functor for use as the second (Dealloc) template parameter of the SharedHandle, SharedLockHandle or ScopedHandle template classes, which calls glib's g_error_free().

This functor enables those classes to manage GError objects in memory which requires to be freed with g_error_free(). It is used in the typedefs GerrorSharedHandle and GerrorScopedHandle. It can also be used as the second template parameter of std::unique_ptr objects.

Member Function Documentation

◆ operator()()

void Cgu::GerrorFree::operator() ( const GError *  obj_p)
inlinenoexcept

The documentation for this class was generated from the following file: