LeakScope: Android Lifecycle & Memory Leak Violations
About this report: This issue was automatically generated by LeakScope, a static analysis tool for Android lifecycle violations and memory leaks built on the Soot framework. This is part of an ongoing academic research study targeting ICSE 2027. No immediate action is required — we would greatly appreciate your feedback on whether these findings are accurate.
Summary
LeakScope detected 12 potential issue(s) across 2 detector type(s):
| Severity |
Count |
| 🔴 High |
9 |
| 🟡 Medium |
0 |
| 🟢 Low (improvement opportunity) |
3 |
| Detector |
Count |
Severity |
Description |
FragmentViewFieldRetentionLeak |
9 |
🔴 High |
Fragment stores View references in instance fields not cleared in onDestroyView() |
ViewBindingOpportunity |
3 |
🟢 Low |
Manual findViewById() calls — ViewBinding migration opportunity |
Detailed Findings
🔴 FragmentViewFieldRetentionLeak
Fragment stores View references in instance fields not cleared in onDestroyView()
Finding #1 — HomeView
Fragment View Field Retention Leak Detected
Class: com.pypisan.kinani.view.HomeView
Issue:
- Fragment stores View references in instance fields
- These fields are not cleared when the view is destroyed
- onDestroyView() is missing
Leaked Fields:
• containerTrending : com.facebook.shimmer.ShimmerFrameLayout (assigned in onViewCreated)
• containerSchedule : com.facebook.shimmer.ShimmerFrameLayout (assigned in onViewCreated)
• containerRecommend : com.facebook.shimmer.ShimmerFrameLayout (assigned in onViewCreated)
• recentTextHeader : android.widget.TextView (assigned in onViewCreated)
• watchList : android.widget.RelativeLayout (assigned in onViewCreated)
• fourthRelative : android.widget.RelativeLayout (assigned in onViewCreated)
• continueWatch : android.widget.RelativeLayout (assigned in onViewCreated)
• continueWatchingRelative : android.widget.RelativeLayout (assigned in onViewCreated)
• triviaQuestion : android.widget.TextView (assigned in onV
… (truncated for brevity)
Finding #2 — SearchListView
Fragment View Field Retention Leak Detected
Class: com.pypisan.kinani.view.SearchListView
Issue:
- Fragment stores View references in instance fields
- These fields are not cleared when the view is destroyed
- onDestroyView() is missing
Leaked Fields:
• bottomAppBar : com.google.android.material.bottomnavigation.BottomNavigationView (assigned in onViewCreated)
• voice_search_button : android.widget.ImageButton (assigned in onViewCreated)
• editText : android.widget.EditText (assigned in onViewCreated)
• ivClearText : android.widget.ImageView (assigned in onViewCreated)
• progressBar : android.widget.ProgressBar (assigned in onViewCreated)
• recyclerView : androidx.recyclerview.widget.RecyclerView (assigned in onViewCreated)
Why this is dangerous:
- Fragment views are destroyed/recreated on config changes
- Retained View references prevent garbage collection
- Leaked Views hold references to Activity Context
- Can cause OutOfMemoryError with repeated Fragment
… (truncated for brevity)
Finding #3 — SavedVideos
Fragment View Field Retention Leak Detected
Class: com.pypisan.kinani.view.SavedVideos
Issue:
- Fragment stores View references in instance fields
- These fields are not cleared when the view is destroyed
- onDestroyView() is missing
Leaked Fields:
• recyclerView_saved_video : androidx.recyclerview.widget.RecyclerView (assigned in onViewCreated)
Why this is dangerous:
- Fragment views are destroyed/recreated on config changes
- Retained View references prevent garbage collection
- Leaked Views hold references to Activity Context
- Can cause OutOfMemoryError with repeated Fragment transactions
Recommended Fix:
Override onDestroyView() and clear all View/Binding fields:
@Override
public void onDestroyView() {
super.onDestroyView();
recyclerView_saved_video = null;
}
Finding #4 — CommonGridView
Fragment View Field Retention Leak Detected
Class: com.pypisan.kinani.view.CommonGridView
Issue:
- Fragment stores View references in instance fields
- These fields are not cleared when the view is destroyed
- onDestroyView() is missing
Leaked Fields:
• bannerAdTop : com.google.android.gms.ads.AdView (assigned in onViewCreated)
• shimmerContainer : com.facebook.shimmer.ShimmerFrameLayout (assigned in onViewCreated)
• recyclerView : androidx.recyclerview.widget.RecyclerView (assigned in onViewCreated)
Why this is dangerous:
- Fragment views are destroyed/recreated on config changes
- Retained View references prevent garbage collection
- Leaked Views hold references to Activity Context
- Can cause OutOfMemoryError with repeated Fragment transactions
Recommended Fix:
Override onDestroyView() and clear all View/Binding fields:
@Override
public void onDestroyView() {
super.onDestroyView();
bannerAdTop = null;
shimmerContainer = null;
recyclerView = null;
… (truncated for brevity)
Finding #5 — UserPageView
Fragment View Field Retention Leak Detected
Class: com.pypisan.kinani.view.UserPageView
Issue:
- Fragment stores View references in instance fields
- These fields are not cleared when the view is destroyed
- onDestroyView() is missing
Leaked Fields:
• userIcon : android.widget.ImageView (assigned in onViewCreated)
• logOutButton : android.widget.TextView (assigned in onViewCreated)
• deleteButton : android.widget.TextView (assigned in onViewCreated)
• changeIcon : android.widget.TextView (assigned in onViewCreated)
• reportIssue : android.widget.TextView (assigned in onViewCreated)
• loader : android.widget.ProgressBar (assigned in onViewCreated)
Why this is dangerous:
- Fragment views are destroyed/recreated on config changes
- Retained View references prevent garbage collection
- Leaked Views hold references to Activity Context
- Can cause OutOfMemoryError with repeated Fragment transactions
Recommended Fix:
Override onDestroyView() and clear all View/Bin
… (truncated for brevity)
Finding #6 — MoviesView
Fragment View Field Retention Leak Detected
Class: com.pypisan.kinani.view.MoviesView
Issue:
- Fragment stores View references in instance fields
- These fields are not cleared when the view is destroyed
- onDestroyView() is missing
Leaked Fields:
• containerMovies : com.facebook.shimmer.ShimmerFrameLayout (assigned in onViewCreated)
• recyclerView : androidx.recyclerview.widget.RecyclerView (assigned in onViewCreated)
Why this is dangerous:
- Fragment views are destroyed/recreated on config changes
- Retained View references prevent garbage collection
- Leaked Views hold references to Activity Context
- Can cause OutOfMemoryError with repeated Fragment transactions
Recommended Fix:
Override onDestroyView() and clear all View/Binding fields:
@Override
public void onDestroyView() {
super.onDestroyView();
containerMovies = null;
recyclerView = null;
}
Finding #7 — SummaryView
Fragment View Field Retention Leak Detected
Class: com.pypisan.kinani.view.SummaryView
Issue:
- Fragment stores View references in instance fields
- These fields are not cleared when the view is destroyed
- onDestroyView() is missing
Leaked Fields:
• containerImgHead : com.facebook.shimmer.ShimmerFrameLayout (assigned in onViewCreated)
• containerImg : com.facebook.shimmer.ShimmerFrameLayout (assigned in onViewCreated)
• containerSummaryText : com.facebook.shimmer.ShimmerFrameLayout (assigned in onViewCreated)
• errorView : android.widget.RelativeLayout (assigned in onViewCreated)
• aboutTextHead : android.widget.TextView (assigned in onViewCreated)
• bannerAd : com.google.android.gms.ads.AdView (assigned in onViewCreated)
• likedFab : com.airbnb.lottie.LottieAnimationView (assigned in onViewCreated)
Why this is dangerous:
- Fragment views are destroyed/recreated on config changes
- Retained View references prevent garbage collection
- Leaked Views hold
… (truncated for brevity)
Finding #8 — KShowView
Fragment View Field Retention Leak Detected
Class: com.pypisan.kinani.view.KShowView
Issue:
- Fragment stores View references in instance fields
- These fields are not cleared when the view is destroyed
- onDestroyView() is missing
Leaked Fields:
• containerDrama : com.facebook.shimmer.ShimmerFrameLayout (assigned in onViewCreated)
• viewSelector : android.widget.LinearLayout (assigned in onViewCreated)
• viewSelected : android.widget.LinearLayout (assigned in onViewCreated)
• recyclerView : androidx.recyclerview.widget.RecyclerView (assigned in onViewCreated)
Why this is dangerous:
- Fragment views are destroyed/recreated on config changes
- Retained View references prevent garbage collection
- Leaked Views hold references to Activity Context
- Can cause OutOfMemoryError with repeated Fragment transactions
Recommended Fix:
Override onDestroyView() and clear all View/Binding fields:
@Override
public void onDestroyView() {
super.onDestroyView();
containe
… (truncated for brevity)
Finding #9 — RecentView
Fragment View Field Retention Leak Detected
Class: com.pypisan.kinani.view.RecentView
Issue:
- Fragment stores View references in instance fields
- These fields are not cleared when the view is destroyed
- onDestroyView() is missing
Leaked Fields:
• container : com.facebook.shimmer.ShimmerFrameLayout (assigned in onViewCreated)
• recyclerView : androidx.recyclerview.widget.RecyclerView (assigned in onViewCreated)
Why this is dangerous:
- Fragment views are destroyed/recreated on config changes
- Retained View references prevent garbage collection
- Leaked Views hold references to Activity Context
- Can cause OutOfMemoryError with repeated Fragment transactions
Recommended Fix:
Override onDestroyView() and clear all View/Binding fields:
@Override
public void onDestroyView() {
super.onDestroyView();
container = null;
recyclerView = null;
}
🟢 ViewBindingOpportunity
Manual findViewById() calls — ViewBinding migration opportunity
Finding #10 — MainActivity
View Binding Migration Opportunity
Class: com.pypisan.kinani.view.MainActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findViewById in callLoginDialog
• findVi
… (truncated for brevity)
Finding #11 — HomeSplash
View Binding Migration Opportunity
Class: com.pypisan.kinani.view.HomeSplash
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in showTerms
• findViewById in showTerms
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #12 — VideoPlayer
View Binding Migration Opportunity
Class: com.pypisan.kinani.play.VideoPlayer
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in showCustomSnackBar
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
… (truncated for brevity)
How to respond to this issue:
- If a finding is a true positive: consider applying the recommended fix and closing this issue.
- If a finding is a false positive: please leave a comment explaining why — your feedback directly improves our research.
- If you have questions: reply here or open a discussion.
This report was generated by LeakScope as part of the ICSE 2027 research artifact. Tool analyzes compiled APKs using Soot static analysis on KinAni.
LeakScope: Android Lifecycle & Memory Leak Violations
Summary
LeakScope detected 12 potential issue(s) across 2 detector type(s):
FragmentViewFieldRetentionLeakViewBindingOpportunityDetailed Findings
🔴
FragmentViewFieldRetentionLeakFragment stores View references in instance fields not cleared in onDestroyView()
Finding #1 —
HomeViewFinding #2 —
SearchListViewFinding #3 —
SavedVideosFinding #4 —
CommonGridViewFinding #5 —
UserPageViewFinding #6 —
MoviesViewFinding #7 —
SummaryViewFinding #8 —
KShowViewFinding #9 —
RecentView🟢
ViewBindingOpportunityManual findViewById() calls — ViewBinding migration opportunity
Finding #10 —
MainActivityFinding #11 —
HomeSplashFinding #12 —
VideoPlayerHow to respond to this issue:
This report was generated by LeakScope as part of the ICSE 2027 research artifact. Tool analyzes compiled APKs using Soot static analysis on KinAni.