【发布时间】:2013-01-06 05:50:55
【问题描述】:
以下两行之间有什么区别从内存的角度
NSString *dbFilePath =[[NSString alloc]initWithString:[[NSBundle mainBundle] pathForResource:dbName ofType:nil]];
和
NSString *dbFilePath =[[[NSBundle mainBundle] pathForResource:dbName ofType:nil] retain];
"[NSString alloc]initWithString:" 或者只是“保留”
提前致谢
【问题讨论】:
标签: objective-c ios memory-management