0

我正在使用 Xcode 4.5.2。我似乎无法解决这个问题。旧的 xcode 工作正常。但他们强迫我删除自动释放和 numValue 释放。我不知道该怎么办。我永远被困在这里。我清理并分析它。我在初始化期间存储到“numValue”的值永远不会被读取。

        NSString *numValue = [[NSString alloc] initWithFormat:@"%d", count1o++];    
        display.text = [display.text stringByAppendingString:digit];

        //[numValue release];
4

1 回答 1

1

我怀疑你想要:

NSString *numValue = [[NSString alloc] initWithFormat:@"%d", count1o++];    
display.text = [display.text stringByAppendingString:numValue];

替换digitnumValue

这不是 Xcode 的版本,而是您现在正在使用 ARC(可能是无意的),并且保留/释放/自动释放是由编译器完成的,并且它们在代码中是不允许的。

于 2013-01-13T03:50:52.513 回答