私の状況: シングルトン クラスのオブジェクトを作成します。オブジェクトには、別のオブジェクトの Ivars といくつかの NSStrings フィールドに関する情報があります。
-(id)init
{
[super init];
objectID=[NSString stringWithString:@"sqlRowId"];
tableNameForBO=[[NSString stringWithString: @"BOComment"] lowercaseString];
ivarListForBO=class_copyIvarList([BOComment class], &ivarCount);
return self;
};
オブジェクトを呼び出すと、最初は正常に動作します。すべてのフィールドに正しい情報があります。しかし、ロードが終了すると (applicationDidFinishLunching の後)、アプリケーションは _UIApplicationHandleEvent を呼び出し、objectID 以外のすべてのフィールドの情報を削除します。
したがって、プログラムでは、一定のままであるこのシングルトンオブジェクトへのポインターがありますが、彼のフィールドには完全に間違った情報があります。
NSZombie さんのコメント:
-[CFString respondsToSelector:]: message sent to deallocated instance 0x6022a10
-[CFString _cfTypeID]: message sent to deallocated instance 0x6022a10
-[CFString _cfTypeID]: message sent to deallocated instance 0x6022bb0
また、プログラム受信信号「EXC_BAD_ACCESS」でアプリケーションがクラッシュします。
何が原因でしょうか? わからない。
どうもありがとうございます!