michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "MacAutoreleasePool.h" michael@0: #include "nsDebug.h" michael@0: michael@0: #import michael@0: michael@0: using mozilla::MacAutoreleasePool; michael@0: michael@0: MacAutoreleasePool::MacAutoreleasePool() michael@0: { michael@0: mPool = [[NSAutoreleasePool alloc] init]; michael@0: NS_ASSERTION(mPool != nullptr, "failed to create pool, objects will leak"); michael@0: } michael@0: michael@0: MacAutoreleasePool::~MacAutoreleasePool() { michael@0: [mPool release]; michael@0: }