Free Static Variables
Keywords: free static variables clear syntax purpose future use restriction

| Prev | Next |  |  |  |  |  | atomic_base_clear |

Free Static Variables
Syntax
`atomic_base<Base>::clear()`
Purpose
Each `atomic_base` objects holds onto work space in order to avoid repeated memory allocation calls and thereby increase speed (until it is deleted). If an the `atomic_base` object is global or static because, the it does not get deleted. This is a problem when using `thread_alloc` free_all to check that all allocated memory has been freed. Calling this `clear` function will free all the memory currently being held onto by the `atomic_base<Base>` class.
Future Use
If there is future use of an `atomic_base` object, after a call to `clear`, the work space will be reallocated and held onto.
Restriction
This routine cannot be called while in parallel execution mode.

Input File: cppad/local/atomic_base.hpp