0
我在我的对象的初始化做这样的:仪器和内存泄露
-(id)initWithBookPath:(NSString*)path {
if (self = [super init]){
self.path = [self.fileSystemPath stringByAppendingPathComponent:@"file.html"];
...
}
return self;
}
路径声明为:@property(nonatomic, retain) NSString *path;
当我启动仪器,它告诉我一个泄漏在这行这是真正的内存泄漏吗?
谢谢您的回答
你有没有分配对象路径? – 2012-07-19 09:40:35
path是一个属性,问题是我没有在dealoc mmethod中做self.path = nil – samir 2012-07-19 09:46:49
在Dealloc和didUnload方法中取消分配你的self.path。 – Leena 2012-07-19 09:54:31