]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/ptr_scpd.h
renamed WXDLLEXPORT_BASE/CORE to WXDLLIMPEXP_BASE/CORE
[wxWidgets.git] / include / wx / ptr_scpd.h
index d5019aaf3af71a135a5d070888d61d89a5b2cdee..79ed8f3f00948ec3c61d4fc1c3c96df287aed471 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     06/01/02
 // RCS-ID:      $Id$
 // Copyright:   (c) Jesse Lovelace and original Boost authors (see below)
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 //  This class closely follows the implementation of the boost
@@ -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);    \