// Purpose: scoped smart pointer class
// Author: Jesse Lovelace <jllovela@eos.ncsu.edu>
// Created: 06/01/02
-// RCS-ID: $Id$
// Copyright: (c) Jesse Lovelace and original Boost authors (see below)
// (c) 2009 Vadim Zeitlin
// Licence: wxWindows licence
\
~name(); \
\
- void reset(T * ptr = NULL) \
- { \
- if (m_ptr != ptr) \
- { \
- wxCHECKED_DELETE(m_ptr);\
- m_ptr = ptr; \
- } \
- } \
+ void reset(T * ptr = NULL); \
\
T *release() \
{ \
};
#define wxDEFINE_SCOPED_PTR(T, name)\
+void name::reset(T * ptr) \
+{ \
+ if (m_ptr != ptr) \
+ { \
+ wxCHECKED_DELETE(m_ptr); \
+ m_ptr = ptr; \
+ } \
+} \
name::~name() \
{ \
wxCHECKED_DELETE(m_ptr); \