AutoreleasePool pool2;
char name;
for (int i = 0; i < 100; ++i)
{
snprintf(name, 20, “object%d”, i);
TestObject *tmpObj = new TestObject(name);
tmpObj->autorelease();
}
是这样么?求解释一下
AutoreleasePool pool2;
char name;
for (int i = 0; i < 100; ++i)
{
snprintf(name, 20, “object%d”, i);
TestObject *tmpObj = new TestObject(name);
tmpObj->autorelease();
}
是这样么?求解释一下