CATextField* CATextField::createWithFrame(const CCRect& frame) { CATextField *text = new CATextField(); if (text && text->initWithFrame(frame)) { text->autorelease(); return text; } CC_SAFE_DELETE(text); return NULL; }