libcaf  0.15.3
Public Member Functions | List of all members
caf::memory_managed Class Reference

This base enables derived classes to enforce a different allocation strategy than new/delete by providing a virtual protected request_deletion() function and non-public destructor. More...

#include <memory_managed.hpp>

Inheritance diagram for caf::memory_managed:
caf::ref_counted caf::abstract_group caf::io::network::manager caf::io::network::multiplexer::runnable caf::logger caf::io::network::acceptor_manager caf::io::network::stream_manager

Public Member Functions

virtual void request_deletion (bool decremented_rc) noexcept
 Default implementations calls `delete this, but can be overriden in case deletion depends on some condition or the class doesn't use default new/delete. More...
 

Detailed Description

This base enables derived classes to enforce a different allocation strategy than new/delete by providing a virtual protected request_deletion() function and non-public destructor.

Member Function Documentation

virtual void caf::memory_managed::request_deletion ( bool  decremented_rc)
virtualnoexcept

Default implementations calls `delete this, but can be overriden in case deletion depends on some condition or the class doesn't use default new/delete.

Parameters
decremented_rcIndicates whether the caller did reduce the reference of this object before calling this member function. This information is important when implementing a type with support for weak pointers.

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