[TIMOB-11606] Android: MapView setLocation memory leak
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Not Our Bug |
Resolution Date | 2012-11-01T18:14:28.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | 2012 Sprint 22 API, 2012 Sprint 22 |
Components | Android |
Labels | api |
Reporter | Hieu Pham |
Assignee | Hieu Pham |
Created | 2012-10-30T00:18:39.000+0000 |
Updated | 2014-06-19T12:43:15.000+0000 |
Description
Memory leaks when setLocation is called.
var win = Ti.UI.createWindow({
backgroundColor : '#00f'
});
var map = Titanium.Map.createView({
mapType : Titanium.Map.STANDARD_TYPE,
region : {
latitude : 42.3366,
longitude : -71.1689,
latitudeDelta : 0.01,
longitudeDelta : 0.01
}
});
function UpdateMapRoute(lat, lon)
{
map.setLocation({
latitude : lat,
longitude : lon,
animate : true,
latitudeDelta : 0.001,
longitudeDelta : 0.004
});
}
var lat = 42.3359;
var lon = -71.1735;
setInterval(function(){
UpdateMapRoute(lat,lon);
lat = lat + .002;
lon = lon + .002;
},500);
win.add(map);
win.open();
Run code, wait about ~40s, app wil crash. You can look at DDMS to see that memory is leaking heavily
This is a native Android bug that has yet to be resolved: http://code.google.com/p/android/issues/detail?id=2181. Closing as Won't Fix.