You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.
I was trying to track down a memory leak with ArFragment in my app so I created a minimal, complete, verifiable example here (Git repo).
It looks like with no other code installed, ArFragment is still leaking when its parent activity is closed.
Symptoms
Leak Canary is just showing:
GC Root: global variable in native code
I've examined the hprof file (zipped, attached here) and it seems like there's still a reference to the Fragment in its Scene's onUpdateListeners and onPeekTouchListeners:
But I may not be reading that accurately — Do we need to do additional tear-down for the ArFragment before exiting the activity? Referencing the sample code here, it doesn't look like I'm missing anything else & I've literally stripped out all other interaction with the fragment apart from resuming/pausing it.
Issue
I was trying to track down a memory leak with
ArFragment
in my app so I created a minimal, complete, verifiable example here (Git repo).It looks like with no other code installed,
ArFragment
is still leaking when its parent activity is closed.Symptoms
Leak Canary is just showing:
I've examined the hprof file (zipped, attached here) and it seems like there's still a reference to the Fragment in its Scene's
onUpdateListeners
andonPeekTouchListeners
:But I may not be reading that accurately — Do we need to do additional tear-down for the
ArFragment
before exiting the activity? Referencing the sample code here, it doesn't look like I'm missing anything else & I've literally stripped out all other interaction with the fragment apart from resuming/pausing it.Context
Dependencies
Using:
But was also occuring with AR Core 1.15.0
Device
I'm seeing this on Android 10 / Nokia 8.1
Please let me know if you need more info.
The text was updated successfully, but these errors were encountered: