From: Mark M. <mie...@gm...> - 2009-08-25 03:28:26
|
For this snippet of API code: // Set up for the DialogControl CSelf. RexxBufferObject cdcBuf = c->NewBuffer(sizeof(CDialogControl)); if ( cdcBuf == NULLOBJECT ) { outOfMemoryException(context); goto done_out; } If the interpreter is out of memory, will it already have raised an exception if it can't get the memory it needs for the new buffer? In other words, is my raising an exception redundent and I could just do this: RexxBufferObject cdcBuf = c->NewBuffer(sizeof(CDialogControl)); if ( cdcBuf == NULLOBJECT ) { goto done_out; } Related to this, I tried following the code, but this syntax stumps me: inline RexxBuffer *new_buffer(size_t s) { return new (s) RexxBuffer; } I don't follow what new (s) RexxBuffer means. The (s) in front of RexxBuffer throws me. Seems like it should be new RexxBuffer(s) ? -- Mark Miesfeld |