Skip to content

Commit 0dcc0e0

Browse files
committed
Correct a few more memory leaks in Setup flows
1 parent 0be5b85 commit 0dcc0e0

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ repositories {
6868
}
6969

7070
dependencies {
71-
compile 'ie.macinnes.htsp:android-htsp:v0.0.1a14'
71+
compile 'ie.macinnes.htsp:android-htsp:v0.0.1a15'
7272
// Used for testing local HTSP lib builds
7373
// compile(name: 'library-debug', ext: 'aar')
7474
compile fileTree(include: ['*.jar'], dir: 'libs')

app/src/main/java/ie/macinnes/tvheadend/account/AuthenticatorActivity.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,9 @@ public void onStop() {
368368
super.onStop();
369369

370370
mConnection.stop();
371+
mConnection.removeConnectionListener(this);
372+
mConnection.removeAuthenticationListener(this);
373+
mConnection = null;
371374
}
372375

373376
@Override

app/src/main/java/ie/macinnes/tvheadend/setup/TvInputSetupActivity.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,13 @@ public void onStart() {
318318
@Override
319319
public void onStop() {
320320
mConnection.stop();
321+
mConnection.removeMessageListener(mEpgSyncTask);
322+
mConnection.removeAuthenticationListener(mEpgSyncTask);
323+
mConnection = null;
324+
325+
mEpgSyncTask.removeEpgSyncListener(this);
326+
mEpgSyncTask = null;
327+
321328
super.onStop();
322329
}
323330

app/src/main/java/ie/macinnes/tvheadend/sync/EpgSyncTask.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,8 +639,8 @@ protected void deletePrograms() {
639639
}
640640

641641
private void handleInitialSyncCompleted(@NonNull HtspMessage message) {
642-
// Ensure we wrap up any pending channel operations before moving onto events. This is no-op
643-
// once there are no pending operations
642+
// Ensure we wrap up any pending channel operations. This is no-op once there are no pending
643+
// operations. This should only be needed when there were no events provided at all.
644644
flushPendingChannelOps();
645645

646646
// Ensure we wrap up any pending event operations. This is no-op once there are no pending

0 commit comments

Comments
 (0)