.NET android memory leak issues
In our Android app, We are facing memory leak issue. so we tried with simple Lable. But issue remains same. Please find below details for leak information.
//////////////////////////////////////////////////////////
┬─── │ GC Root: Global variable in native code │ ╰→ android.widget.LinearLayout instance Leaking: YES (ObjectWatcher was watching this because crc641149b9fe658fbe8e.CustomFragment received Fragment#onDestroyView() callback (references to its views should be cleared to prevent leaks) and View.mContext references a destroyed activity) Retaining 2.2 kB in 44 objects key = 61478e55-e8c2-4719-831c-ac8c548c4bac watchDurationMillis = 19909 retainedDurationMillis = 11081 View not part of a window view hierarchy View.mAttachInfo is null (view detached) View.mWindowAttachCount = 1 mContext instance of crc641149b9fe658fbe8e.MapActivity with mDestroyed = true
METADATA
Build.VERSION.SDK_INT: 34 Build.MANUFACTURER: Google LeakCanary version: 2.10 App process name: com.companyname.AndroidApp2 Class count: 29018 Instance count: 213300 Primitive array count: 154111 Object array count: 31403 Thread count: 29 Heap total bytes: 29178006 Bitmap count: 8 Bitmap total bytes: 222790 Large bitmap count: 0 Large bitmap total bytes: 0 Db 1: open /data/user/0/com.companyname.AndroidApp2/databases/com.microsoft. appcenter.persistence Db 2: open /data/user/0/com.companyname.AndroidApp2/databases/leaks.db Stats: LruCache[maxSize=3000,hits=116427,misses=201971,hitRate=36%] RandomAccess[bytes=9958639,reads=201971,travel=81094436772,range=35128630,size=4 4047340] Analysis duration: 11694 ms
////////////////////////////////////////////////////////////