Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

InternalLifecycleIntegration memory leak on P emulator #280

@edenman

Description

@edenman
In co.recharge.consumer.debug:1.15.2:96.
* flow.InternalLifecycleIntegration has leaked:
* static FontsContract.sContext
* ↳ DebugConsumerApp.injectedAuthenticatedStuff
* ↳ ConsumerApp$InjectedAuthenticatedStuff.onSignedInHelper
* ↳ OnSignedInHelper.signInHooks
* ↳ array OnSignedIn[].[4]
* ↳ PlaceDirections.placeIDToDirectionsRelays
* ↳ LinkedHashMap.tail
* ↳ LinkedHashMap$LinkedHashMapEntry.value
* ↳ BehaviorRelay.state
* ↳ RelaySubscriptionManager.value
* ↳ RelaySubscriptionManager$State.observers
* ↳ array RelaySubscriptionManager$RelayObserver[].[0]
* ↳ RelaySubscriptionManager$RelayObserver.actual
* ↳ OperatorObserveOn$ObserveOnSubscriber.child
* ↳ OnSubscribeOnAssembly$OnAssemblySubscriber.actual
* ↳ SafeSubscriber.actual
* ↳ ActionSubscriber.onNext
* ↳ WalkingTimeView$setPlace$1.this$0 (anonymous implementation of rx.functions.Action1)
* ↳ WalkingTimeView.!(mContext)!
* ↳ FlowContextWrapper.!(mBase)!
* ↳ MainActivity.mFragments
* ↳ FragmentController.mHost
* ↳ Activity$HostCallbacks.mFragmentManager
* ↳ FragmentManagerImpl.mAdded
* ↳ ArrayList.elementData
* ↳ array Object[].[0]
* ↳ InternalLifecycleIntegration

A fun thing I learned today is that Flow uses Fragments for some reason? I'm looking at the InternalLifecycleIntegration code and I'm pretty much baffled by what's going on. Looks like it attaches a fragment to the Activity in onCreate, but then somehow FragmentManager is keeping a reference to it even after the activity has been destroyed?

LeakCanary 1.6.2, fwiw

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions