Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对这个问题感到很困惑。我使用 Instruments 在我的代码中找到了一个僵尸。通常我会浏览负责呼叫者的列表并修复它。唯一的问题是我的代码中不存在负责任的调用者方法之一。我找不到!
我找不到-[SpriteSheet setImage:]。setImage: 方法不在我的代码中。这对我来说听起来很疯狂,但是当我对我的代码进行文本样式搜索时,它出现了空。我查看了 SpriteSheet 类,没有名为 setImage: 的方法。
请告诉我我在这里遗漏了一些东西。
setImage 方法可能是从 SpriteSheet 类的属性中合成的: @property(retain) UIImage *image;=> @synthesize image;=> 有代码,因为它是自动生成的。
@property(retain) UIImage *image;
@synthesize image;
但似乎您在 Enemy::dealloc 中释放了图像,但尝试在那里再次访问它。(最后 3 行)