InterViews Reference Manual -- StringPool

NAME
StringPool - store strings in large chunks
SYNOPSIS
#include <InterViews/strpool.h>
DESCRIPTION
A string pool is an area for character storage. Because strings in a pool cannot be independently deallocated, it is generally faster to allocate them than to use new in C++ or malloc in C.
PUBLIC OPERATIONS
StringPool(int size = 800)
Construct a string pool. The size is used to allocate contiguous blocks of storage. When one block is consumed, another block is allocated from the operating system. The default block size will fit in a small page (1024-byte).
~StringPool()
Free the storage associated with the string pool.
char* Append(const char*, int)
Add a string of a given length to a pool. Append does not add a null to terminate strings in the pool; if desired, null-termination must be performed explicitly by the caller.
SEE ALSO
malloc(3)

Next: StringTable | Prev: StringEditor | Up: index | Top: index