This class has identical behaviour to scoped_ptr, except it manages heap-allocated arrays instead of heap-allocated single objects. More...
#include <scoped_resource.hpp>


Public Member Functions | |
| scoped_array (T *p) | |
This class has identical behaviour to scoped_ptr, except it manages heap-allocated arrays instead of heap-allocated single objects.
Usage example:
{
const scoped_array<char> ptr(new char[n]);
...use ptr as you would a normal char*...
} // ptr is automatically deleted here
Definition at line 178 of file scoped_resource.hpp.
| util::scoped_array< T >::scoped_array | ( | T * | p | ) | [inline, explicit] |
Definition at line 180 of file scoped_resource.hpp.
| Generated by doxygen 1.7.1 on Fri May 25 2012 01:25:46 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |