Hi all..
I just want to ask some final question regarding the memory management in iPhone?
1. What is the leak in following line?
I posted the same before also.. Still i didnt get any satisfactory reply...
2. When the following method get called?
- (void)applicationDidReceiveMemoryWarningUIApplication *)application
is it when app is over-shooting the memory allowed or when doing some illegal memory operations???
I just want to ask some final question regarding the memory management in iPhone?
1. What is the leak in following line?
Code:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *MyIdentifier = @"MyIdentifier";
UITableViewCell *cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:MyIdentifier]autorelease];
}
[COLOR="red"]cell.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:imageName]]];[/COLOR]
return cell;
I posted the same before also.. Still i didnt get any satisfactory reply...
2. When the following method get called?
- (void)applicationDidReceiveMemoryWarningUIApplication *)application
is it when app is over-shooting the memory allowed or when doing some illegal memory operations???