开发者

Are subviews into a UIView released when the parent ones is released?

开发者 https://www.devze.com 2023-03-16 12:10 出处:网络
I\'m working on a PDF app running iOS4.3. I trying to put in a horizontal UIScrollView all the PDF pages and when it\'s needed drawLayer:inContext: it\'s called.

I'm working on a PDF app running iOS4.3. I trying to put in a horizontal UIScrollView all the PDF pages and when it's needed drawLayer:inContext: it's called.

My doubt is about realeasing the main UISc开发者_如何学编程rollView. I check it with Instruments and memory don't free as much as it had grown. I have to go one by one releasing de UIView that contains the PDF?

I always release CGPage and CGDocument after drawing. I also get memory warnings when zooming.

Thanks in advance.


Yes, a UIView owns its subviews so it releases them when dealloc is called on it. This does not necessarily call dealloc on the subviews, for example, if they are retained elsewhere.

0

精彩评论

暂无评论...
验证码 换一张
取 消