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

Memory leak in admob sdk #441

Open
stasenkotsyandex opened this issue May 10, 2022 · 0 comments
Open

Memory leak in admob sdk #441

stasenkotsyandex opened this issue May 10, 2022 · 0 comments

Comments

@stasenkotsyandex
Copy link

Hi everyone, I detected memory leak. Open InterstitialExample, load ad, show, close ad and then rotate screen. I suppose the problem in InterstitialAd#show method. Leekcanary report:

┬───
│ GC Root: Global variable in native code
│
├─ com.google.android.gms.dynamic.ObjectWrapper instance
│    Leaking: UNKNOWN
│    Retaining 528 B in 1 objects
│    ↓ ObjectWrapper.a
│                    ~
├─ com.google.android.gms.ads.internal.webview.y instance
│    Leaking: UNKNOWN
│    Retaining 37.1 kB in 604 objects
│    View not part of a window view hierarchy
│    View.mAttachInfo is null (view detached)
│    View.mWindowAttachCount = 1
│    mContext instance of com.google.android.gms.ads.internal.webview.aw,
│    wrapping androidx.multidex.MultiDexApplication
│    ↓ y.a
│        ~
├─ com.google.android.gms.ads.internal.webview.ac instance
│    Leaking: UNKNOWN
│    Retaining 9.5 kB in 210 objects
│    View not part of a window view hierarchy
│    View.mAttachInfo is null (view detached)
│    View.mWindowAttachCount = 1
│    p instance of com.google.android.gms.ads.internal.webview.aw, wrapping
│    androidx.multidex.MultiDexApplication
│    mContext instance of com.google.android.gms.ads.internal.webview.aw,
│    wrapping androidx.multidex.MultiDexApplication
│    ↓ ac.aa
│         ~~
├─ android.view.WindowManagerImpl instance
│    Leaking: UNKNOWN
│    Retaining 27.7 kB in 467 objects
│    mContext instance of android.app.ContextImpl
│    ↓ WindowManagerImpl.mContext
│                        ~~~~~~~~
├─ android.app.ContextImpl instance
│    Leaking: YES (ContextImpl.mOuterContext is an instance of com.google.
│    android.gms.example.interstitialexample.MyActivity with Activity.
│    mDestroyed true)
│    Retaining 4.7 kB in 51 objects
│    mAutofillClient instance of com.google.android.gms.example.
│    interstitialexample.MyActivity with mDestroyed = true
│    mOuterContext instance of com.google.android.gms.example.
│    interstitialexample.MyActivity with mDestroyed = true
│    ↓ ContextImpl.mAutofillClient
╰→ com.google.android.gms.example.interstitialexample.MyActivity instance
​     Leaking: YES (ObjectWatcher was watching this because com.google.android.
​     gms.example.interstitialexample.MyActivity received Activity#onDestroy()
​     callback and Activity#mDestroyed is true)
​     Retaining 4.3 kB in 145 objects
​     key = 4c398712-68d9-420f-8e07-94cb18d5579b
​     watchDurationMillis = 9502
​     retainedDurationMillis = 4500
​     mApplication instance of androidx.multidex.MultiDexApplication
​     mBase instance of androidx.appcompat.view.ContextThemeWrapper

METADATA

Build.VERSION.SDK_INT: 29
Build.MANUFACTURER: Google
LeakCanary version: 2.9.1
App process name: com.google.android.gms.example.interstitialexample
Class count: 15590
Instance count: 112626
Primitive array count: 78846
Object array count: 14100
Thread count: 112
Heap total bytes: 13459103
Bitmap count: 7
Bitmap total bytes: 77519
Large bitmap count: 0
Large bitmap total bytes: 0
Db 1: open /data/user/0/com.google.android.gms.example.
interstitialexample/no_backup/androidx.work.workdb
Db 2: closed /data/user/0/com.google.android.gms.example.
interstitialexample/databases/google_app_measurement_local.db
Stats: LruCache[maxSize=3000,hits=39435,misses=75842,hitRate=34%]
RandomAccess[bytes=3766929,reads=75842,travel=21117064880,range=16389971,size=21
065444]
Analysis duration: 21081 ms 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant