forked from upstream-mirrors/OpenTracks
In MyTracks onDestroy, set trackDataHub to null to save memory
This commit is contained in:
@@ -249,7 +249,7 @@ public class MyTracks extends TabActivity implements OnTouchListener {
|
||||
protected void onDestroy() {
|
||||
Log.d(TAG, "MyTracks.onDestroy");
|
||||
serviceConnection.unbind();
|
||||
|
||||
((MyTracksApplication) getApplication()).clearTrackDataHub();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,9 +26,7 @@ public class MyTracksApplication extends Application {
|
||||
return trackDataHub;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTerminate() {
|
||||
public void clearTrackDataHub() {
|
||||
trackDataHub = null;
|
||||
super.onTerminate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user