bug 634702 - add autorelease pool in nsNativeThemeCocoa constructor to prevent leaks during startup. r=joshmoz

This commit is contained in:
Jonathan Kew 2011-04-08 23:56:56 -07:00
Родитель ce80539af7
Коммит 4c16d4518b
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -233,6 +233,10 @@ nsNativeThemeCocoa::nsNativeThemeCocoa()
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
// provide a local autorelease pool, as this is called during startup
// before the main event-loop pool is in place
nsAutoreleasePool pool;
mPushButtonCell = [[NSButtonCell alloc] initTextCell:nil];
[mPushButtonCell setButtonType:NSMomentaryPushInButton];
[mPushButtonCell setHighlightsBy:NSPushInCellMask];