Manage temporary object stored on the heap. More...
#include <object.h>
Public Member Functions | |
T & | operator* () |
Access heap object through our temporary directly. | |
T * | operator-> () |
Access members of our heap object through our temporary. | |
temporary () | |
Construct a temporary object, create our stack frame reference. |
Manage temporary object stored on the heap.
This is used to create a object on the heap who's scope is controlled by the scope of a member function call. Sometimes we have data types and structures which cannot themselves appear as auto variables. We may also have a limited stack frame size in a thread context, and yet have a dynamic object that we only want to exist during the life of the method call. Using temporary allows any type to be created from the heap but have a lifespan of a method's stack frame. All types managed as temporary must have Temporary as a base class.
Definition at line 374 of file object.h.
T& ucc::temporary< T >::operator* | ( | ) | [inline] |
T* ucc::temporary< T >::operator-> | ( | ) | [inline] |