Question

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.

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top