If I alloc/init a view and add it to a another view in code (I did not use a xib) – do I need to remove it when the containing UIViewController’s dealloc message is sent? I have seen this code in certain places, and wondered is it necessary under some circumstances to free memory?
Thanks,
Marc
If you do this,
or
,the
vwill be released when its parent view release;When the parent view use
addSubview, it will retain the subview, and will release the subview when it is released.