[TIMOB-10480] iOS: Ti.Media.openMusicLibrary results in memory leak
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Hold |
Resolution Date | 2012-08-20T12:09:33.000+0000 |
Affected Version/s | Release 2.1.0, Release 2.1.1 |
Fix Version/s | Release 3.0.0 |
Components | iOS |
Labels | api |
Reporter | Nikhil Sharma |
Assignee | Neeraj Gupta |
Created | 2012-08-16T17:49:20.000+0000 |
Updated | 2017-03-17T18:30:39.000+0000 |
Description
Ti.Media.openMusicLibrary leaves 100k memory leak. You can see a set of objects related to search bar, UIImage remain allocated.
Repo Steps
1. Run the below code in app.js 2. Open the application in device. 3. Run the instruments and you can see the memory leak.
function showMusicLibrary() {
Ti.Media.openMusicLibrary({
success: function(picked) {
Ti.API.info('picked: ' + picked.items[0]);
},
error: function(error) {
var a = Ti.UI.createAlertDialog({
title: 'Music Picker'
});
if(error.code === Ti.Media.NO_MUSIC_PLAYER) {
a.setMessage('Please run this test on device');
} else {
a.setMessage('Unexpected error: ' + error.code);
}
a.show();
},
mediaTypes: [Ti.Media.MUSIC_MEDIA_TYPE_ALL],
autohide: true
});
}
var tabGroup = Titanium.UI.createTabGroup();
var win1 = Titanium.UI.createWindow({
backgroundColor:'black'
});
var tab1 = Titanium.UI.createTab({
title:'Tab 1',
window:win1
});
var button = Titanium.UI.createButton({
title: 'Select music',
width: 200, height: 40
});
win1.add(button);
button.addEventListener('click', function() {
showMusicLibrary();
});
tabGroup.addTab(tab1);
tabGroup.open();
This ia an apple bug. Problem ID: 12133443 Since it's an iOS SDK issue so putting it on hold. Waiting for apple to fix it.
Nikhil, could you check on the status of any fix from Apple please?
Closing ticket due to time passed.