![]() | InDesign SDK 20.5 |
#include <IDThreading.h>

Public Member Functions | |
| ThreadLocalManagedObject (const T &intVal) | |
| T * | Get () |
| const T * | Get () const |
| const T & | GetReference () const |
| void | Set (const T &val) |
| void | Reset () |
Similar to ThreadLocal, this class allows users to create unique instances of a variable for each thread. It actually uses a ThreadLocal internally and it adds the ability to automatically create the instance on the first access of the variable. All instances of ThreadLocalManagedObject associated with a thread will be destroyed when EndPublicThreadBottleneck() is called (when the thread finishes).