VBox* VBox::create(const cocos2d::Size &size) { VBox* widget = new (std::nothrow) VBox(); if (widget && widget->initWithSize(size)) { widget->autorelease(); return widget; } CC_SAFE_DELETE(widget); return nullptr; }
VBox* VBox::create() { VBox* widget = new (std::nothrow) VBox(); if (widget && widget->init()) { widget->autorelease(); return widget; } CC_SAFE_DELETE(widget); return nullptr; }