开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜