iOS题

 

对于语句NSString* testObject = [[NSData alloc] init];关于testObject是什么类型对象,以下说法正确的是:

答案:(A)

      68、
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSString *str = [NSString stringWithFormat:@”abc”];
NSString *str2 = [str retain];
[pool release];
NSLog(@”str retainCount = %d,str2 retainCount = %d”,[str retainCount],[str2 retainCount]);
上述代码打印结果正确的是:

答案:(C)

posted @ 2014-11-27 19:59  mengxiangtong22  阅读(239)  评论(0编辑  收藏  举报