#include <allocatingpointer.h>
Inheritance diagram for MemoryReference< T >:
Essentially, this class peforms simple single-use garbage collection. In general, an AllocatingPointer is more useful, but this class is required in some cases. Specifically, this class can handle objects of an unknown derived type, even if the type does not support a clone() operation (e.g. the standard numeric or string types.) It does so by sacrificing the ability to copy the pointed-to object; the copy simply has no pointer at all.
Definition at line 187 of file allocatingpointer.h.
Public Methods | |
MemoryReference (T *pointer=0) | |
Constructor; accepts 0 or a pointer to an object for which we are responsible. | |
MemoryReference (const MemoryReference &) | |
Copy constructor; does not copy pointer. | |
self & | operator= (const MemoryReference &) |
Copy assignment; does not copy pointer. |