Beast Logo

PrevUpHomeNext

handler_alloc

An allocator that uses handler customizations.

template<
    class T,
    class Handler>
class handler_alloc

This allocator uses the handler customizations asio_handler_allocate and asio_handler_deallocate to manage memory. It meets the requirements of Allocator and can be used anywhere a std::allocator is accepted.

T

The type of objects allocated by the allocator.

Handler

The type of handler.

Remarks

Memory allocated by this allocator must be freed before the handler is invoked or undefined behavior results. This behavior is described as the "deallocate before invocation" Asio guarantee.

Requirements

Header: beast/core/handler_alloc.hpp

Convenience header: beast/core.hpp


PrevUpHomeNext