本文整理汇总了C++中ACE_Message_Block::release_i方法的典型用法代码示例。如果您正苦于以下问题:C++ ACE_Message_Block::release_i方法的具体用法?C++ ACE_Message_Block::release_i怎么用?C++ ACE_Message_Block::release_i使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ACE_Message_Block
的用法示例。
在下文中一共展示了ACE_Message_Block::release_i方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ACE_TRACE
int
ACE_Message_Block::release_i (ACE_Lock *lock)
{
ACE_TRACE ("ACE_Message_Block::release_i");
// Free up all the continuation messages.
if (this->cont_)
{
ACE_Message_Block *mb = this->cont_;
ACE_Message_Block *tmp = 0;
do
{
tmp = mb;
mb = mb->cont_;
tmp->cont_ = 0;
ACE_Data_Block *db = tmp->data_block ();
if (tmp->release_i (lock) != 0)
{
ACE_Allocator *allocator = db->data_block_allocator ();
ACE_DES_FREE (db,
allocator->free,
ACE_Data_Block);
}
}
while (mb);
this->cont_ = 0;
}
int result = 0;
if (ACE_BIT_DISABLED (this->flags_,
ACE_Message_Block::DONT_DELETE) &&
this->data_block ())
{
if (this->data_block ()->release_no_delete (lock) == 0)
result = 1;
this->data_block_ = 0;
}
// We will now commit suicide: this object *must* have come from the
// allocator given.
if (this->message_block_allocator_ == 0)
delete this;
else
{
ACE_Allocator *allocator = this->message_block_allocator_;
ACE_DES_FREE (this,
allocator->free,
ACE_Message_Block);
}
return result;
}