summaryrefslogtreecommitdiffstats
path: root/base/scoped_nsautorelease_pool.mm
blob: c4ae517e22794879f67c3ad7a95578a97cf72bf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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