From 718314f4426f59e6323d4bbb504d93380b0ec2bc Mon Sep 17 00:00:00 2001 From: Devang-Android <76443293+Devang-Android@users.noreply.github.com> Date: Wed, 16 Mar 2022 02:40:03 +0530 Subject: [PATCH] disposables obj is not using .dispose() in onDestroy() Here instead of .dispose() we are just using clear() the list which actually still perform unnecessary changes. --- .../android/samples/ui/operators/DisposableExampleActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/rxjava2/android/samples/ui/operators/DisposableExampleActivity.java b/app/src/main/java/com/rxjava2/android/samples/ui/operators/DisposableExampleActivity.java index 9e51b3c..7d2afe0 100644 --- a/app/src/main/java/com/rxjava2/android/samples/ui/operators/DisposableExampleActivity.java +++ b/app/src/main/java/com/rxjava2/android/samples/ui/operators/DisposableExampleActivity.java @@ -48,7 +48,7 @@ public void onClick(View view) { @Override protected void onDestroy() { super.onDestroy(); - disposables.clear(); // do not send event after activity has been destroyed + disposables.dispose(); // do not send event after activity has been destroyed } /*