My code below is causing memory leak. Can someone please have a look at it and give me a solution
NSData *data = [[NSData alloc] initWithContentsOfURL:imgurl];
[fileManager createDirectoryAtPath:imagePath attributes:nil];
[data writeToFile:imageFilePath atomically:NO];
[getProfile setObject:imageFilePath forKey
"img"];
[testArray1 addObject:getProfile];
[data release];
[getProfile release];
}
Thanks,
A
NSData *data = [[NSData alloc] initWithContentsOfURL:imgurl];
[fileManager createDirectoryAtPath:imagePath attributes:nil];
[data writeToFile:imageFilePath atomically:NO];
[getProfile setObject:imageFilePath forKey
[testArray1 addObject:getProfile];
[data release];
[getProfile release];
}
Thanks,
A