\section{\class{wxScopedPtr}}\label{wxscopedptrtemplate} A scoped pointer template class. It is the template version of the old-style \helpref{scoped pointer macros}{wxscopedptr}. \wxheading{Derived from} No base class \wxheading{Include files} \wxheading{Data structures} {\small% \begin{verbatim} typedef T element_type \end{verbatim} }% \wxheading{See also} \helpref{wxSharedPtr}{wxsharedptr}, \helpref{wxWeakRef}{wxweakref} \latexignore{\rtfignore{\wxheading{Members}}} \membersection{wxScopedPtr::wxScopedPtr}\label{wxscopedptrtemplatewxscopedptrtemplate} \func{wxEXPLICIT}{wxScopedPtr}{\param{T * }{ptr = NULL}} Constructor. \membersection{wxScopedPtr::\destruct{wxScopedPtr}}\label{wxscopedptrtemplatedtor} \func{}{\destruct{wxScopedPtr}}{\void} Destructor. \membersection{wxScopedPtr::get}\label{wxscopedptrtemplateget} \constfunc{T *}{get}{\void} Returns pointer to object or NULL. \membersection{wxScopedPtr::operator unspecified\_bool\_type}\label{wxscopedptrtemplateoperatorbool} \constfunc{}{operator unspecified\_bool\_type}{\void} Conversion to a boolean expression (in a variant which is not convertable to anything but a boolean expression). If this class contains a valid pointer it will return {\it true}, if it contains a NULL pointer it will return {\it false}. \membersection{wxScopedPtr::operator*}\label{wxscopedptrtemplateoperatorreft} \constfunc{T \&}{operator*}{\void} Returns a reference to the object. If the internal pointer is NULL this method will cause an assert in debug mode. \membersection{wxScopedPtr::operator->}\label{wxscopedptrtemplateoperatorderef} \constfunc{T *}{operator->}{\void} Returns pointer to object. If the pointer is NULL this method will cause an assert in debug mode. \membersection{wxScopedPtr::release}\label{wxscopedptrtemplaterelease} \func{T*}{release}{\void} Releases the current pointer and returns it. \membersection{wxScopedPtr::reset}\label{wxscopedptrtemplatereset} \func{void}{reset}{\param{T * }{ptr = NULL}} Reset pointer. Afterwards the caller is responsible for deleting the data contained in the scoped pointer before. \membersection{wxScopedPtr::swap}\label{wxscopedptrtemplateswap} \func{void}{swap}{\param{wxScopedPtr \& }{ot}} Swaps pointers.