Chapter 81 Unregistering Threads
If the logic of your application requires spawning new threads, and in those threads you are calling a Connext API such as write(), you may notice a memory growth.
Most platforms support automatic cleanup of resources that are stored in thread-specific storage (TSS).
Refer to the RTI Connext Core Libraries Platform Notes to see if your platform supports automatic TSS cleanup. It will be mentioned in the "Thread Configuration" section of the platform you are using.
On platforms that support automatic TSS cleanup, you don't need to do anything special when your threads exit.
On platforms that don't support this behavior, you must call unregister_thread() right before exiting the thread to ensure that all the resources allocated in that thread are correctly released.
The unregister_thread() API in each language binding is as follows:
Language |
unregister_thread API |
---|---|
C |
|
Traditional C++ |
|
Modern C++ |
|
C# |
|
Java |
com::rti::dds::domain::DomainParticipantFactory::unregister_thread() |
Python |