X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5b222f1c9e0acb63c781675555c76f6129316eb1..15d521a109c4de5b2e18bb7b953bfedd5505a1ee:/include/wx/ptr_scpd.h?ds=sidebyside diff --git a/include/wx/ptr_scpd.h b/include/wx/ptr_scpd.h index d5019aaf3a..79ed8f3f00 100644 --- a/include/wx/ptr_scpd.h +++ b/include/wx/ptr_scpd.h @@ -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); \