私のアプリケーションはARC対応です。
アプリデリゲートで私はコードを書きました
[self performSelectorInBackground:@selector(initializeAnimationImageArrays) withObject:nil];
そして私の方法は
- (void)initializeAnimationImageArrays
{
NSArray *animationArray = [NSArray arrayWithObjects:
[UIImage imageNamed:@"1.png"],
[UIImage imageNamed:@"2.png"],
[UIImage imageNamed:@"3.png"],
nil];
}
私は以下のようないくつかのエラーメッセージを見てきました
*** __NSAutoreleaseNoPool(): Object 0x926d620 of class NSPathStore2 autoreleased with no pool in place - just leaking
以下のようにメソッドを変更することで、この問題を修正しました。
@autoreleasepool
{
NSArray *animationArray = [NSArray arrayWithObjects:
[UIImage imageNamed:@"1.png"],
[UIImage imageNamed:@"2.png"],
[UIImage imageNamed:@"3.png"],
nil];
}
この文脈で何が起こっているのか、誰かが私に説明してもらえますか?