diff options
Diffstat (limited to 'base/memory/scoped_nsobject.h')
-rw-r--r-- | base/memory/scoped_nsobject.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/base/memory/scoped_nsobject.h b/base/memory/scoped_nsobject.h index 0656dbe..5d98e3f 100644 --- a/base/memory/scoped_nsobject.h +++ b/base/memory/scoped_nsobject.h @@ -96,6 +96,11 @@ class scoped_nsprotocol { return temp; } + // Shift reference to the autorelease pool to be released later. + NST autorelease() { + return [release() autorelease]; + } + private: NST object_; }; |