[英]Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFType next]: unrecognized selector sent to instance '
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFType next]: unrecognized selector sent to instance ' this error is occuring because this line "[self autorelease];" 由于未捕获的异常'NSInvalidArgumentException'而终止应用程序,原因:'-[__ NSCFType next]:无法识别的选择器已发送至实例'发生此错误,因为此行“ [self autorelease];” if i comment this line then the exception not come but app looks very slow,so please tell me that what could i wrote the line that instead of that line 如果我对此行发表评论,那么异常不会出现,但应用程序看起来非常慢,所以请告诉我,我能写什么而不是该行
if(sqlite3_step(statement)==SQLITE_ROW) { pagestr = [NSString stringWithUTF8String:(char *)sqlite3_column_text(statement,0)]; //dateLabel.text=previousDate; //textView.text=pagestr; EditorPage* prev= [[EditorPage alloc] initWithNibName:@"EditorPage" bundle:nil]; prev.dateString= previousDate; prev.bodyString= pagestr; NSArray* array= [[NSArray alloc] initWithObjects:prev,@"forward",nil]; [[NSNotificationCenter defaultCenter] postNotificationName:@"next EditorPage" object:array]; [prev autorelease]; }
When do you do [ self autorelease ]
? 您什么时候做[ self autorelease ]
? I think that's very unusual--it's probably incorrect. 我认为这很不正常-可能是错误的。
This message means you are sending the message next to an object of NSCFType
. 此消息意味着您要发送的消息的对象旁边 NSCFType
。
Messages like this are often caused by sending a message to an object that has been release and whose memory was subsequently reallocated to a different type of object. 此类消息通常是由于向已释放的对象发送消息而导致的,该对象的内存随后被重新分配给其他类型的对象。
You can turn on zombies to track down this kind of issue. 您可以打开僵尸来跟踪此类问题。 Also, you could move your code to ARC to help avoid retain/release issues. 此外,您可以将代码移至ARC,以帮助避免保留/发布问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.