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