diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-18 04:48:08 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-18 04:48:08 +0000 |
commit | d9665c451618489bd8248c7f5b7991a92702a2f4 (patch) | |
tree | b15181a543d4f6b9d336ef8905b105940e6a7c37 /ace/Message_Block.h | |
parent | 2bdea35e958caf3c78ff34010df3e50f9ac71048 (diff) | |
download | ATCD-d9665c451618489bd8248c7f5b7991a92702a2f4.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace/Message_Block.h')
-rw-r--r-- | ace/Message_Block.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ace/Message_Block.h b/ace/Message_Block.h index bc106eef0bd..3826646765c 100644 --- a/ace/Message_Block.h +++ b/ace/Message_Block.h @@ -181,6 +181,9 @@ public: virtual ~ACE_Message_Block (void); // Delete all the resources held in the message. + // + // Note that release() is designed to release the continuation + // chain; the destructor is not. See release() for details. // = Message Type accessors and mutators. @@ -247,6 +250,24 @@ public: // ACE_Data_Block's reference count goes to 0, it is deleted. // In all cases, this ACE_Message_Block is deleted - it must have come // from the heap, or there will be trouble. + // + // release() is designed to release the continuation chain; the + // destructor is not. If we make the destructor release the + // continuation chain by calling release() or delete on the message + // blocks in the continuation chain, the following code will not + // work since the message block in the continuation chain is not off + // the heap: + // + // ACE_Message_Block mb1 (1024); + // ACE_Message_Block mb2 (1024); + // + // mb1.cont (&mb2); + // + // And hence, call release() on a dynamically allocated message + // block. This will release all the message blocks in the + // continuation chain. If you call delete or let the message block + // fall off the stack, cleanup of the message blocks in the + // continuation chain becomes the responsibility of the user. static ACE_Message_Block *release (ACE_Message_Block *mb); // This behaves like the non-static method <release>, except that it |