mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-03 09:53:06 +02:00
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