diff options
Diffstat (limited to 'base/scoped_nsautorelease_pool.mm')
-rw-r--r-- | base/scoped_nsautorelease_pool.mm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/base/scoped_nsautorelease_pool.mm b/base/scoped_nsautorelease_pool.mm new file mode 100644 index 0000000..c4ae517 --- /dev/null +++ b/base/scoped_nsautorelease_pool.mm @@ -0,0 +1,19 @@ +// Copyright (c) 2008 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/scoped_nsautorelease_pool.h" + +#import <Foundation/Foundation.h> + +namespace base { + +ScopedNSAutoreleasePool::ScopedNSAutoreleasePool() + : autorelease_pool_([[NSAutoreleasePool alloc] init]) { +} + +ScopedNSAutoreleasePool::~ScopedNSAutoreleasePool() { + [autorelease_pool_ drain]; +} + +} // namespace base |