.TH "SbStorage" 3 "Wed May 23 2012" "Version 3.1.3" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SbStorage \- .PP The \fBSbStorage\fP class manages thread-local memory\&. .PP This class manages thread-local memory\&. When different threads access the memory an \fBSbStorage\fP object manages, they will receive different memory blocks back\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSbStorage\fP (unsigned int size)" .br .ti -1c .RI "\fBSbStorage\fP (unsigned int size, cc_storage_f *constr, cc_storage_f *destr)" .br .ti -1c .RI "\fB~SbStorage\fP (void)" .br .ti -1c .RI "void * \fBget\fP (void)" .br .ti -1c .RI "void \fBapplyToAll\fP (SbStorageApplyFunc *func, void *closure)" .br .in -1c .SH "Detailed Description" .PP The \fBSbStorage\fP class manages thread-local memory\&. .PP This class manages thread-local memory\&. When different threads access the memory an \fBSbStorage\fP object manages, they will receive different memory blocks back\&. This provides a mechanism for sharing read/write static data\&. .PP One important implementation detail: if the Coin library was explicitly configured to be built without multi-platform thread abstractions, or neither pthreads nor native Win32 thread functions are available, it will be assumed that the client code will all run in the same thread\&. This means that the same memory block will be returned for any request without considering the current thread id\&. .SH "Constructor & Destructor Documentation" .PP .SS "SbStorage::SbStorage (unsigned intsize)\fC [inline]\fP" Constructor\&. \fIsize\fP specifies the number of bytes each thread should have in this thread-local memory management object\&. .SS "SbStorage::~SbStorage (void)\fC [inline]\fP" The destructor\&. .SH "Member Function Documentation" .PP .SS "void * SbStorage::get (void)\fC [inline]\fP" This method returns the calling thread's thread-local memory block\&. .SS "void SbStorage::applyToAll (SbStorageApplyFunc *func, void *closure)\fC [inline]\fP" This method will call \fIfunc\fP for all thread local storage data\&. \fIclosure\fP will be supplied as the second parameter to the callback\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.