UIView
UIImageView
),当我释放
UIView视图
,将
UIImageView视图
我将视图和子视图设置为:
UIView *view=[[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
UIImage *myImage=[UIImage imageNamed:@"image.png"];
// This is the subview:
UIImageView *imageView=[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
imageView.image=myImage;
[view addSubview:imageView];
[imageView release];
现在,当我打电话的时候:
[view removeFromSuperview];
[view release];
分配的imageView是否也会被释放,或者我应该通过删除视图的所有子视图来删除它?
对这个话题的任何见解都将不胜感激。