This may sound a newbie question, however I'm new to iOS dev.
I've following code.
- (void) onUploadButtonClick
{
UIImagePickerController* imgPicker = [[UIImagePickerController alloc] init];
[[[UIApplication sharedApplication] keyWindow] setRootViewController:imgPicker];
imgPicker.delegate = self;
imgPicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
imgPicker.allowsEditing = NO;
[self presentModalViewController:imgPicker animated:YES];
[imgPicker release];
}
I'm running the app and profiling for memory leaks, so by just clicking on the button and closing it, without doing anything I am getting memory leak. I'm running this on simulator.
Any ideas why this happens ?
UPDATE : Leak info from profiler's console Leaked Object,# Address Size Responsible Library Responsible Frame
Malloc 32.50 KB,3 < multiple > 99840 MusicLibrary MemNewPtrClear
Malloc 32.50 KB, 0xa083800 33280 MusicLibrary MemNewPtrClear
Malloc 32.50 KB, 0x7840a00 33280 MusicLibrary MemNewPtrClear
Malloc 32.50 KB, 0x7806a00 33280 MusicLibrary MemNewPtrClear
Leaked Object,# Address Size Responsible Library Responsible Frame
Malloc 32.50 KB, 0xa083800 33280 MusicLibrary MemNewPtrClear
Leaked Object,# Address Size Responsible Library Responsible Frame
Malloc 32.50 KB, 0x7840a00 33280 MusicLibrary MemNewPtrClear
Leaked Object,# Address Size Responsible Library Responsible Frame
Malloc 32.50 KB, 0x7806a00 33280 MusicLibrary MemNewPtrClear
Leaked Object,# Address Size Responsible Library Responsible Frame
Malloc 128.00 KB, 0x128de000 131072 MusicLibrary ReadITImageDB