在OpenLayer类中把“时钟界面”的layer用createWithTTF重写一遍会报内存错误。为什么?求解答。
Size winSize=Director::getInstance()->getWinSize();
Label *label=Label::createWithSystemFont("时钟界面","",48);
label->setPosition(Vec2(winSize.width/2,winSize.height*3/4));
label->setColor(Color3B(255,0,0));
this->addChild(label);
改成
Label *label=Label::createWithTTF("clcok","fonts/Maker Felt.ttf",48);
Size size1=Director::getInstance()->getWinSize();
label->setPosition(Vec2(size1.width/2,size1.height*3/4));
this->addChild(label);
为什么编译通过后在运行中报内存错误?