Steps to Reproduce
-
Create an activity with a singleTop launch mode and add a class member of type ObservableCollection or LruCache.
-
Create a second activity with a parent the first activity.
-
Run the app and from the first activity (which is the main activity) start the second activity.
-
Now do some resource consumption operation as loading a bitmap.
The result is JavaFinalize() is called on the member of the first activity while the second activity is displayed and the first is in background. This is not acceptable! The instance of the first activity is still alive, but some members are disposed (Java.Lang.Object Handle becomes null). When I return back to the first activity that member is already disposed (OnCreate is not called because of the singleTop mode).
Expected Behavior
All members of the first activity should be alive.
Actual Behavior
Some of the members of the first activity are disposed.
Version Information
Xamarin Android SDK 8.3.3.2.
Reproduced on a real device (LG G4C) running Android API 23.
Visual Studio Community version 15.7.5.
Steps to Reproduce
Create an activity with a singleTop launch mode and add a class member of type ObservableCollection or LruCache.
Create a second activity with a parent the first activity.
Run the app and from the first activity (which is the main activity) start the second activity.
Now do some resource consumption operation as loading a bitmap.
The result is JavaFinalize() is called on the member of the first activity while the second activity is displayed and the first is in background. This is not acceptable! The instance of the first activity is still alive, but some members are disposed (Java.Lang.Object Handle becomes null). When I return back to the first activity that member is already disposed (OnCreate is not called because of the singleTop mode).
Expected Behavior
All members of the first activity should be alive.
Actual Behavior
Some of the members of the first activity are disposed.
Version Information
Xamarin Android SDK 8.3.3.2.
Reproduced on a real device (LG G4C) running Android API 23.
Visual Studio Community version 15.7.5.