added release()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-06-29 15:44:08 +00:00
parent 86c7378f32
commit 5455e22751
2 changed files with 21 additions and 5 deletions

View File

@@ -68,7 +68,7 @@ private: \
name & operator=(name const &); \
\
public: \
wxEXPLICIT name(T * ptr = NULL) \
wxEXPLICIT name(T * ptr = NULL) \
: m_ptr(ptr) { } \
\
~name(); \
@@ -82,6 +82,13 @@ public: \
} \
} \
\
T *release() \
{ \
T *ptr = m_ptr; \
m_ptr = NULL; \
return ptr; \
} \
\
T & operator*() const \
{ \
wxASSERT(m_ptr != NULL); \