Problem while removing UItableviewcell subviews in iphone development
i am using following code for removing subviews from UItableviewcell to clear out previous subviews before adding new ones

if ([cell.contentView subviews]) {

   for (UIView *subview in [cell.contentView subviews]) {

	[subview removeFromSuperview];
    }
}

problem here is that one of the subviews is an UIImageView object and because of which after removing these imageview (subviews) my application crashes. I cannot even keep it as it is as multiple Imageviews stacking makes application heavier and application eventually throws memorylevel warnings and crashes.

Thanks in advance
Problem while removing UItableviewcell subviews in iphone development
===

i am using following code for removing subviews from UItableviewcell to clear out previous subviews before adding new ones

if ([cell.contentView subviews]) {

   for (UIView *subview in [cell.contentView subviews]) {

	[subview removeFromSuperview];
    }
}

problem here is that one of the subviews is an UIImageView object and because of which after removing these imageview (subviews) my application crashes. I cannot even keep it as it is as multiple Imageviews stacking makes application heavier and application eventually throws memorylevel warnings and crashes.

Thanks in advance