Closed Jack-Xiao closed 7 years ago
初步判断是InfiniteIndicatorLayout的内部类ScrollHandler导致的内存泄漏,还待进一步测试,你那边产生OOM的情景是怎样的呢?
我也并没有更多的信息,这是友盟错误日志。 查了下关于Handler的内存泄露。 在轮播图没有加载出来,就进行快速的手势切换。是否会产生多个Message,进而 remove不完全呢。 希望能尽快解决啊。
快速滑动不会产生问题,因为每次都会remove掉之前的message,看log是picasso加载资源出现了问题
使用该库时遇到的错误: OutOfMemoryError, 以下为错误详细,是否可以提供解决建议. java.lang.OutOfMemoryError at java.util.WeakHashMap.newEntryArray(WeakHashMap.java:53) at java.util.WeakHashMap.rehash(WeakHashMap.java:645) at java.util.WeakHashMap.put(WeakHashMap.java:626) at com.squareup.picasso.Picasso.defer(Picasso.java:419) at com.squareup.picasso.RequestCreator.into(RequestCreator.java:574) at cn.lightsky.infiniteindicator.slideview.BaseSliderView.loadByPicasso(BaseSliderView.java:231) at cn.lightsky.infiniteindicator.slideview.BaseSliderView.bindEventAndShow(BaseSliderView.java:190) at cn.lightsky.infiniteindicator.slideview.DefaultSliderView.getView(DefaultSliderView.java:25) at cn.lightsky.infiniteindicator.indicator.RecyleAdapter.getView(RecyleAdapter.java:55) at cn.lightsky.infiniteindicator.jakewharton.salvage.RecyclingPagerAdapter.instantiateItem(RecyclingPagerAdapter.java:54) at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:869) at android.support.v4.view.ViewPager.populate(ViewPager.java:1085) at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:551) at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:513) at android.support.v4.view.ViewPager.setCurrentItem(ViewPager.java:505) at cn.lightsky.infiniteindicator.InfiniteIndicatorLayout.scrollOnce(InfiniteIndicatorLayout.java:226) at cn.lightsky.infiniteindicator.InfiniteIndicatorLayout$ScrollHandler.handleMessage(InfiniteIndicatorLayout.java:287) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:177) at android.app.ActivityThread.main(ActivityThread.java:4947) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805) at dalvik.system.NativeStart.main(Native Method)