Public Member Functions

util::scoped_array< T > Struct Template Reference

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>

Inheritance diagram for util::scoped_array< T >:
Inheritance graph
[legend]
Collaboration diagram for util::scoped_array< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 scoped_array (T *p)

Detailed Description

template<typename T>
struct util::scoped_array< T >

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.


Constructor & Destructor Documentation

template<typename T>
util::scoped_array< T >::scoped_array ( T *  p  )  [inline, explicit]

Definition at line 180 of file scoped_resource.hpp.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:25:46 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs