I tested several different initialization strategies including default,
aggregate, and value initialization and there was not much difference. I
used default initialization in the end (what is represented by the code
above) because there didn't seem to be a need to zero-initialize POD types
in a temporary buffer.
Also, while looking through the code I found instances where
OCTAVE_LOCAL_BUFFER was being used with constants that are small and fixed
at compile time. Given that OCTAVE_LOCAL_BUFFER is designed for dynamic,
and possibly large, buffers which are stored on the heap, I believe it
makes sense to replace these instances with local variables which would be
stored on the stack. As an example,
corefcn/load-save.cc:225: OCTAVE_LOCAL_BUFFER (unsigned char, magic, 2);
A 2-byte scratchpad just isn't worth the new/delete overhead.