diff options
-rw-r--r-- | base/mac/scoped_mach_port.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/base/mac/scoped_mach_port.h b/base/mac/scoped_mach_port.h index 0b2ac7f..a98ca5e 100644 --- a/base/mac/scoped_mach_port.h +++ b/base/mac/scoped_mach_port.h @@ -9,6 +9,7 @@ #include "base/base_export.h" #include "base/basictypes.h" +#include "base/compiler_specific.h" namespace base { namespace mac { @@ -32,6 +33,12 @@ class BASE_EXPORT ScopedMachPort { return port_; } + mach_port_t release() WARN_UNUSED_RESULT { + mach_port_t temp = port_; + port_ = MACH_PORT_NULL; + return temp; + } + private: mach_port_t port_; |