class A { static A *create(); bool init(); }; A* A::create() { A *pRet=new A; if(pRet && pRet->init()) { pRet->autoRelease(); } else { delete pRet; pRet=NULL; } return pRet; } bool A::init(){ /*先初始化父类*/ FATHER->init(); return true;}
时间: 2024-10-18 10:39:12