summaryrefslogtreecommitdiffstats
path: root/testing/platform_test_mac.mm
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-20 22:37:59 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-20 22:37:59 +0000
commitc77043fc18d43d6e858ec0920a5801438eae566f (patch)
tree2b645c87c61e436c5e0aa5827bfd7eb2204b7078 /testing/platform_test_mac.mm
parent756797e2e4aab2c78ee3fa4bd855447ee62eb9af (diff)
downloadchromium_src-c77043fc18d43d6e858ec0920a5801438eae566f.zip
chromium_src-c77043fc18d43d6e858ec0920a5801438eae566f.tar.gz
chromium_src-c77043fc18d43d6e858ec0920a5801438eae566f.tar.bz2
Move NSAutoreleasePool management into the PlatformTest constructor and
destructor. The pool operations are moving from SetUp and TearDown, which are scoped slightly too narrowly for our needs. Using the constructor and destructor ensures that the pools properly bracket tests. Review URL: http://codereview.chromium.org/174171 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23897 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'testing/platform_test_mac.mm')
-rw-r--r--testing/platform_test_mac.mm8
1 files changed, 4 insertions, 4 deletions
diff --git a/testing/platform_test_mac.mm b/testing/platform_test_mac.mm
index e4aaeab..bd22cd5 100644
--- a/testing/platform_test_mac.mm
+++ b/testing/platform_test_mac.mm
@@ -6,10 +6,10 @@
#import <Foundation/Foundation.h>
-void PlatformTest::SetUp() {
- pool_ = [[NSAutoreleasePool alloc] init];
+PlatformTest::PlatformTest()
+ : pool_([[NSAutoreleasePool alloc] init]) {
}
-void PlatformTest::TearDown() {
- [pool_ drain];
+PlatformTest::~PlatformTest() {
+ [pool_ release];
}