ios4 - iPhone app uses 150 MB memory and still no low memory warning! -


i have questionary application, navigation based create , push tableviews eachtime nib. there no leakage , in instruments live bytes seems around 2-3 mb.

i tested in real device (jailbroken ios4 iphone), when go through deep in navigation (around 200 page pushes) can see memory usage goes upto 150 mb! when navigate root freed, isnt weird behavior? (around 800 kb each nib view , no big data or images in it)

the weird thing is, put alerts didreceivememorywarning , didunloadview methods, , yet didnt receive memory alerts!

-why never memory warning , viewdidunload app uses 150 mb , more of memory? -application works memory usage problem apple store?

something funky going on. try following code check os version of how memory app uses

-(void) report_memory {     struct task_basic_info info;     mach_msg_type_number_t size = sizeof(info);     kern_return_t kerr = task_info(mach_task_self(),                                    task_basic_info,                                    (task_info_t)&info,                                    &size);     if( kerr == kern_success ) {         nslog(@"memory in use (in bytes): %u", info.resident_size);     } else {         nslog(@"error task_info(): %s", mach_error_string(kerr));     }   } 

you need #import "mach/mach.h"

this tell how memory operating system has granted app. if seeing weird instruments behavior, should shed light.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -