template<typename T>
class aspect::Utilities::ScratchSpace< T >
A class that allows for creating reusable chunks of memory. When this class's get_object_from_pool() function is called, it returns a reference to a currently unused object, or creates a new one if non are available. When done with an object it can be returned to the pool for later use. This is particularly useful when needing the same size memory in a function which is called in a loop. Since the objects are not reset, using this scratch space can prevent reallocating memory over and over. This class works in recursive functions. The class is recommended to be used with the ScopedScratchObject, which will automatically return the object to the pool when the ScopedScratchObject goes out of scope.
Definition at line 89 of file utilities.h.