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() {
|
protected void onDestroy() {
|
||||||
Log.d(TAG, "MyTracks.onDestroy");
|
Log.d(TAG, "MyTracks.onDestroy");
|
||||||
serviceConnection.unbind();
|
serviceConnection.unbind();
|
||||||
|
((MyTracksApplication) getApplication()).clearTrackDataHub();
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,9 +26,7 @@ public class MyTracksApplication extends Application {
|
|||||||
return trackDataHub;
|
return trackDataHub;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public void clearTrackDataHub() {
|
||||||
public void onTerminate() {
|
|
||||||
trackDataHub = null;
|
trackDataHub = null;
|
||||||
super.onTerminate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user