views:

47

answers:

1

My app is a client what can watch videos online. I test my app with Instruments,i selected Leaks,ObjectAlloc,Memory Monitor from library of Instruments.I find that All Allocations Live Bytes is just 9.33 MB,but it's 81 MB in Memory Monitor,told me this process use a lot of memory.And when i play a movie,the usage still comes up ,but there are no leaks can be found . In device's console, it continues warns low memory form level 1 to level 2,then crashed.i fell so sad about that .Anyone could told me reason? By the way ,in my app,it contains about 40MB picture resource.Whether if the resource size too big cause that problem?

+2  A: 

Hi,

Few points to notice:

  • Are NSZombie enabled in your project?
  • Are you using [UIImage imageWithName:@"imageName"]? These may cause serious problems as the method caches the images into memory. Avoid using it whenever possible.
  • Are your deallocs complete?

Please check all the above things, you, possibly, would be doing any of the above, but what looks closure to your problem is the second reason.

Hope this helps.

Madhup
thanks a lot ,i think the problem is what you just told me ,i have about 1800 pics in my app.my god
ben
i replace all [uiimage imageWithName:]into NSString *path = [[NSBundle mainBundle] pathForResource:@"icon" ofType:@"png"];myImage = [UIImage imageWithContentsOfFile:path];but it does nothing special.
ben