I have an iPad app that crashes on the iPad (first model) as it runs out of memory.
In the application, I have a main view that adds about 20 UIScrollViews (user class) in the form of subviews, each of which contains UIImageView and UIImage . When the user moves to the next page, I will remove all these routines from the supervisor, and then add 20 new UIScrollViews to the same view.
If I profile the application for allocations and memory leaks, everything is fine - the allocated memory remains about 2 MB, and the user scrolls left and right.
However, if I look at the actual memory usage in the activity monitor, I see that every time a user navigates to a new page, the real memory increases by about 20 MB. In the end, after several new pages, the application size reaches 150+ MB and crashes.
Can anyone suggest what might cause this type of behavior and how can I eliminate it?
A bit more information about the structure of the application:
- In boot mode, images were uploaded to
NSMutableArray using initWithContentsOfFile .
source share