gpt4 book ai didi

android - 应用程序从家回来后中断

转载 作者:搜寻专家 更新时间:2023-11-01 08:55:38 25 4
gpt4 key购买 nike

<分区>

我有一个应用程序,当我按下主页按钮并等待一段时间,试图返回应用程序时,我正在强制关闭并且我的应用程序显示无意义。

我发现的唯一错误:

java.lang.OutOfMemoryError: (Heap Size=98304KB, Allocated=90124KB)
at android.database.CursorWindow.nativeGetString(Native Method)
at android.database.CursorWindow.getString(CursorWindow.java:492)
at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:51)
at myapppackage.domain.Operator.buildFromCursor(Operator.java:39)
at myapppackage.adapter.CarouselAdapter.getMostCenterFavoriteOperatorId(CarouselAdapter.java:223)
at myapppackage.fragment.OperatorsFragment.onLoadFinished(OperatorsFragment.java:118)
at myapppackage.fragment.OperatorsFragment.onLoadFinished(OperatorsFragment.java:44)
at android.app.LoaderManagerImpl$LoaderInfo.callOnLoadFinished(LoaderManager.java:483)
at android.app.LoaderManagerImpl$LoaderInfo.onLoadComplete(LoaderManager.java:451)
at android.content.Loader.deliverResult(Loader.java:143)
at myapppackage.fragment.OperatorsFragment$DataLoader.deliverResult(OperatorsFragment.java:213)
at myapppackage.fragment.OperatorsFragment$DataLoader.deliverResult(OperatorsFragment.java:169)
at android.content.AsyncTaskLoader.dispatchOnLoadComplete(AsyncTaskLoader.java:254)
at android.content.AsyncTaskLoader$LoadTask.onPostExecute(AsyncTaskLoader.java:91)
at android.os.AsyncTask.finish(AsyncTask.java:631)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:5751)
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:1083)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:850)
at dalvik.system.NativeStart.main(Native Method)

我怎样才能防止这种情况发生?

编辑:

有一段关于内存泄漏查找的非常有用的演讲:

http://www.youtube.com/watch?v=_CruQY55HOk&feature=share&list=PL4uOUQa48SihVk0Mh9-STLs8HnKuAgMD6

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com