找到Zombie对象,但找不到负责的来电者

时间:2012-12-20 15:37:49

标签: xcode nszombie

我对这个问题很困惑。我使用Instruments在我的代码中找到了一个Zombie。通常我会查看负责的调用者列表并修复它。唯一的问题是我的代码中不存在负责的调用方法之一。我找不到了!

enter image description here

我找不到 - [SpriteSheet setImage:]。 setImage:方法在我的代码中没有。这对我来说听起来很疯狂,但是当我对我的代码进行文本样式搜索时,它会变空。我查看了SpriteSheet类,没有名为setImage的方法:。

请告诉我,我在这里遗漏了一些东西。

1 个答案:

答案 0 :(得分:0)

setImage方法很可能是从SpriteSheet类的属性中合成的:
@property(retain) UIImage *image; => @synthesize image; =>有代码,因为它是自动生成的。

但似乎你在Enemy :: dealloc中释放图像,但尝试再次访问它。 (最后3行)