MongoDB  2.1.1-pre-
Public Member Functions
mongo::StackBufBuilder Class Reference

The StackBufBuilder builds smaller datasets on the stack instead of using malloc. More...

#include <builder.h>

Inheritance diagram for mongo::StackBufBuilder:
mongo::_BufBuilder< StackAllocator >

List of all members.

Public Member Functions

void decouple ()

Detailed Description

The StackBufBuilder builds smaller datasets on the stack instead of using malloc.

this can be significantly faster for small bufs. However, you can not decouple() the buffer with StackBufBuilder. While designed to be a variable on the stack, if you were to dynamically allocate one, nothing bad would happen. In fact in some circumstances this might make sense, say, embedded in some other object.


The documentation for this class was generated from the following file: