/* static */ void UIActionPool::createTemporary(UIActionPoolType type) { UIActionPool *pActionPool = 0; switch (type) { case UIActionPoolType_Selector: pActionPool = new UIActionPoolSelector(true); break; case UIActionPoolType_Runtime: pActionPool = new UIActionPoolRuntime(true); break; default: AssertFailedReturnVoid(); } AssertPtrReturnVoid(pActionPool); pActionPool->prepare(); pActionPool->cleanup(); delete pActionPool; }
/* static */ void UIActionPool::createTemporary(UIActionPoolType type) { UIActionPool *pHelperPool = 0; switch (type) { case UIActionPoolType_Selector: pHelperPool = new UIActionPoolSelector; break; case UIActionPoolType_Runtime: pHelperPool = new UIActionPoolRuntime; break; default: break; } if (pHelperPool) { pHelperPool->prepare(); pHelperPool->cleanup(); delete pHelperPool; } }