Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SharedElement and custom EnterTransition causes memory leak #23

Open
codingjeremy opened this issue Sep 3, 2019 · 3 comments
Open

SharedElement and custom EnterTransition causes memory leak #23

codingjeremy opened this issue Sep 3, 2019 · 3 comments
Labels
migrated googlesamples Migrated from old googlesamples repos

Comments

@codingjeremy
Copy link
Collaborator

Issue by zhongjhATC
Monday May 20, 2019 at 09:29 GMT
Originally opened as googlearchive/android-unsplash#12


I'm from China. My English is not very good. I'm very sorry.

The following is from the report :
In com.example.android.unsplash:1.0:1.

  • com.example.android.unsplash.DetailActivity has leaked:
  • GC ROOT android.os.ResultReceiver$MyResultReceiver.this$0
  • references android.app.ExitTransitionCoordinator.mResultReceiver
  • references android.app.EnterTransitionCoordinator.mEnterViewsTransition
  • references android.transition.TransitionSet.mParent
  • references android.transition.TransitionSet.mListeners
  • references java.util.ArrayList.array
  • references array java.lang.Object[].[1]
  • references android.transition.TransitionManager$MultiListener$1.val$runningTransitions (anonymous subclass of android.transition.Transition$TransitionListenerAdapter)
  • references android.util.ArrayMap.mArray
  • references array java.lang.Object[].[2]
  • references com.android.internal.policy.PhoneWindow$DecorView.mContext
  • leaks com.example.android.unsplash.DetailActivity instance

Use Leaks records,Keep going in and out of DetailActivity

@codingjeremy
Copy link
Collaborator Author

Comment by zhongjhATC
Monday May 20, 2019 at 09:29 GMT


https://stackoverflow.com/questions/32698049/sharedelement-and-custom-entertransition-causes-memory-leak

this didn't work for me

@codingjeremy codingjeremy added the migrated googlesamples Migrated from old googlesamples repos label Sep 3, 2019
@zhongjhATC
Copy link

There are still memory leaks

@vullnetlimani
Copy link

vullnetlimani commented Feb 26, 2024

Oh joy, the leak that just won't quit! I've tried everything to make a workaround, yet it persists like a relentless mosquito. You swat it away, thinking you're finally in the clear, but nope! The leak's just chilling there, mocking your efforts with a resounding "I'm still here!" 🦟💢

│ GC Root: Global variable in native code

├─ android.os.ResultReceiver$MyResultReceiver instance
│ Leaking: UNKNOWN
│ Retaining 1.9 MB in 7174 objects
│ ↓ ResultReceiver$MyResultReceiver.this$0
│ ~~~~~~
├─ android.app.ExitTransitionCoordinator instance
│ Leaking: UNKNOWN
│ Retaining 1.9 MB in 7173 objects
│ ↓ ExitTransitionCoordinator.mExitCallbacks
│ ~~~~~~~~~~~~~~
├─ android.app.ExitTransitionCoordinator$ActivityExitTransitionCallbacks instance
│ Leaking: UNKNOWN
│ Retaining 1.9 MB in 7161 objects
│ mActivity instance of com.example.LoginActivity with mDestroyed = true
│ ↓ ExitTransitionCoordinator$ActivityExitTransitionCallbacks.mActivity
│ ~~~~~~~~~
╰→ com.example.LoginActivity instance
​ Leaking: YES (ObjectWatcher was watching this because com.example.loginScreen.
​ LoginActivity received Activity#onDestroy() callback and Activity#mDestroyed is true)
​ Retaining 1.9 MB in 7160 objects
​ key = 20ac3e85-49f5-4063-a9f9-d744f7d8df4e
​ watchDurationMillis = 5399
​ retainedDurationMillis = 398
​ mApplication instance of com.example.test
​ mBase instance of androidx.appcompat.view.ContextThemeWrapper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
migrated googlesamples Migrated from old googlesamples repos
Projects
None yet
Development

No branches or pull requests

3 participants