Create a raw deleter proctor that conditionally manages an object.

Synopsis

Declared in <bslma_rawdeleterproctor.h>

RawDeleterProctor(
    TYPE* object,
    ALLOCATOR* allocator);

Description

Create a raw deleter proctor that conditionally manages the specified object (if non‐zero), and that uses the specified allocator to delete the object managed by this proctor (if not released ‐‐ see release) upon destruction. The behavior is undefined unless allocator is non‐zero and supplied the memory for object (if non‐zero). Note that allocator must remain valid throughout the lifetime of this proctor.

Parameters

Name

Description

object

Object to manage, or 0 for none.

allocator

Allocator (or pool) used to delete the managed object.

Created with MrDocs