CAImageView* CAImageView::createWithLayout(const CrossApp::DLayout &layout) { CAImageView * pRet = new CAImageView(); if (pRet && pRet->initWithLayout(layout)) { pRet->autorelease(); return pRet; } CC_SAFE_DELETE(pRet); return NULL; }