Errata for The ACE Programmer's Guide
(Last updated: January 30, 2006)
Page(s) |
Description |
| Many examples didn't compile successfully on AIX using Visual Age C++ or when using explicit template instantiation. Please obtain the latest source code examples from ACE 5.3c or 5.4a. | |
39 |
States that ACE_NDEBUG causes logging output to be no-oped away. Actually, it is ACE_NLOGGING which has this affect. |
98 |
The DataElement arrays inside the for loops should be outside the loop to avoid unnecessary overhead of creating the array on each iteration. |
104 |
operator==() is not a member of KeyType; it compares two KeyType objects. |
105 |
operator int() should be 'const'. |
112 |
Code example at top of page should have #include "ace/Synch.h" |
151 174 |
ACE_Message_Block mb allocated using data-reference variant of constructor; data becomes invalidated upon return from handle_input(), and block's write pointer is not updated. Change to using the size-only constructor, then ACE_Message_Block::copy() to copy the data to the block. |
178 |
ACE_DEBUG at the bottom of the page: format "%*C" should be "%.*C". |
179 |
handle_timeout() did not create the ACE_Message_Block correctly. Referring to an existing buffer does not copy the data. handle_timeout() doesn't increment this->iterations_. It should be ++this->iterations_. |
221 |
Return value from ACE_Process::spawn() should be checked against ACE_INVALID_PID, not -1, to be portable. |
221-225 |
ACE_TRACE macro invocations incorrectly wrapped the string argument in ACE_TEXT. ACE_TRACE adds ACE_TEXT for you. |
273-274 |
The example code didn't work at all. It's been replaced. |
327 335 |
class Manager's derivation from IManager is missing "private" keyword. |
328 |
The return type from Manager::thread_id (Worker *) is now ACE_thread_t, not int. Improves portability. |
330 |
Shouldn't do an ACE_ASSERT on an operation that needs to be performed regardless of the ACE_NDEBUG setting. There's a memory leak if a MB_HANGUP block is received. |
331 332 |
Shouldn't initialize a pointer with NULL. Use 0 instead. |
342 |
elect_new_leader() method should not use ACE_ASSERT for operations that must be performed regardless of the ACE_NDEBUG setting. |
361 |
In the code example at the top of the page, the forward reference to class Record should be a #include "Record.h" so it can build on AIX with Visual Age C++. |
380 381 398-401 414 |
The RecordingStream class's open() method was changed to properly inherit from ACE_Stream. This means overriding open() and not changing its argument types. For Answerer, it only creates a new EndModule if the passed-in tail pointer is 0 (the default). For CommandStream, the ACE_SOCK_Stream must now be passed to the constructor, and open is called with the normal ACE_Stream::open() args. This allows reuse of these classes in wider situations. |
385 |
In the first line, ACE_MessageQueue should be ACE_Message_Queue. |
388-391 |
There were a number of memory leaks due to extra duplicates of ACE_Message_Block objects being created. |
397 |
Lines in Figure 18.2 are much too light. |
401 405-416 |
The enumerators in Command need some prefix to insure they don't clash with system-provided macros. |
447 |
typedef for ActiveTimer should split to two lines. |
448 |
ACE_MAIN need not declare the argument names because they're unused. The interval variable should be initialized with 100000 usec, not 1000, to be 1.1 secs as the comment indicates. |
463 |
Name_Binding's destructor should not delete [] this->type_. The memory cam from ACE_OS::strdup(), so must be freed using ACE_OS::free(). |
482 |
ACE_Asynch_Acceptor set in wrong font. |
482-485 490-492 498 503 |
The GUI-integrated reactor implementations are (or end) on page 185, not 186. |
506 |
The X Windows-related index entries are one page too high. |

