I saw this thing on using instruments for my app. When I profile my app, the initial memory occupied is 563 KB which is before UIImagePickerController
pops up. There is one button on the first viewController which makes the UIImagePickerController
appear.
As soon as UIImagePickerController
appears, memory occupied goes upto 1.6 - 1.7 MB. If I select any image or cancel the UIImagePickerController
, the memory occupied is still 1.6 - 1.7 MB which I believe should be 563 KB(or may be few KB's more).
Please see the below code I have used :
- (IBAction)chooseButtonPressed:(id)sender
{
UIImagePickerController *pickerController = [[UIImagePickerController new]autorelease];
[pickerController setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
[pickerController setDelegate:self];
}
Why is the memory not being released?
overall bytes
occupied or thelive bytes
? For obvious reasons,overall bytes
will never decrease... – Hiersoverall bytes
, there must be a column oflive bytes
. Observe the values in this column and your question will be answered! – HiersLive bytes
are two columns to the left ofOverall bytes
. Also, byBoth Live bytes and Overall bytes are same.
, did you mean their values are same as each other or same with time? – Hierslive bytes
vs.overall bytes
? – Hiers