Just as the destructor, reset() calls delete on T pointer and so can
only be defined when T is fully defined.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64222
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
\
~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); \