OpenDDS  Snapshot(2023/04/07-19:43)
Public Member Functions | List of all members
OpenDDS::DCPS::Message_Block_Deleter Struct Reference

#include <Message_Block_Ptr.h>

Public Member Functions

void operator() (ACE_Message_Block *ptr) const
 

Detailed Description

Definition at line 17 of file Message_Block_Ptr.h.

Member Function Documentation

◆ operator()()

void OpenDDS::DCPS::Message_Block_Deleter::operator() ( ACE_Message_Block ptr) const
inline

Definition at line 19 of file Message_Block_Ptr.h.

References ACE_Message_Block::cont(), and ACE_Message_Block::release().

19  {
20  // In order to avoid locking order issues for message blocks with different locking strategies,
21  // it is safer to unlink elements in the chain before releasing them individually
22  while (ptr) {
23  ACE_Message_Block* cont = ptr->cont();
24  ptr->cont(0);
26  ptr = cont;
27  }
28  }
virtual ACE_Message_Block * release(void)
ACE_Message_Block * cont(void) const

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