문제

I am developing a complete application using the template "page-based storyboard".

But whenever I turn page, I see thru the instruments that the amount of memory allocated only increase and never decrease, so until a crash occurs.

Trying in iPad device crash too.

To simplify and try to find the problem, I created a test app using the same template and opting for ARC, only loading the image of the pages that I use and no change anything in the original apple code, even in this simple application the problem occurs.

I think the problem is because all page are stay allocated like this issue PageViewController: How to release ViewControllers added to it?

but I m using storyboard, so, where is: PageView *pView = [[PageView alloc] init];

I have: MWViewController *dataViewController = [storyboard instantiateViewControllerWithIdentifier:@"MWDataViewController"]

I try to put autorelease but no effect.

도움이 되었습니까?

해결책

The problem that I was having is that I was using background image in all pages and the imageNamed: method caches images which makes my memory footprint grow. I used the UIImage initWithContentsOfFile: method and my foot print stayed mostly flat.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top