]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/ptr_scpd.h
xti streaming
[wxWidgets.git] / include / wx / ptr_scpd.h
index b574491359fbcdfe7e245f6a23640d107b2facf0..79ed8f3f00948ec3c61d4fc1c3c96df287aed471 100644 (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);    \