Tag: 回收

canvas:试图在Android中使用回收的位图android.graphics.Bitmap

我正在裁剪图像类,但遇到一个回收的位图问题: 03-02 23:14:10.514: E/AndroidRuntime(16736): FATAL EXCEPTION: Thread-1470 03-02 23:14:10.514: E/AndroidRuntime(16736): java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@428e5450 03-02 23:14:10.514: E/AndroidRuntime(16736): at android.graphics.Canvas.throwIfRecycled(Canvas.java:1026) 03-02 23:14:10.514: E/AndroidRuntime(16736): at android.graphics.Canvas.drawBitmap(Canvas.java:1096) 03-02 23:14:10.514: E/AndroidRuntime(16736): at android.graphics.Bitmap.createBitmap(Bitmap.java:604) 03-02 23:14:10.514: E/AndroidRuntime(16736): at eu.janmuller.android.simplecropimage.CropImage$1.prepareBitmap(CropImage.java:630) 03-02 23:14:10.514: E/AndroidRuntime(16736): at eu.janmuller.android.simplecropimage.CropImage$1.run(CropImage.java:636) 03-02 23:14:10.514: E/AndroidRuntime(16736): at eu.janmuller.android.simplecropimage.CropImage$6.run(CropImage.java:343) 03-02 23:14:10.514: E/AndroidRuntime(16736): at eu.janmuller.android.simplecropimage.Util$BackgroundJob.run(Util.java:175) 03-02 […]

RecyclerView在NestedScrollView中使用时不会回收视图

我在NestedScrollView内使用RecyclerView 。 另外我设置setNestedScrollingEnabled为false为recyclerview 支持较低的API ViewCompat.setNestedScrollingEnabled(mRecyclerView, false); 现在! 当用户滚动视图的每件事情似乎没关系,但! recyclerview中的视图不会被回收! 堆大小迅速增长! 更新 :RecyclerView布局pipe理器是StaggeredLayoutManager fragment_profile.xml : <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/coordinator" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" > </android.support.design.widget.AppBarLayout> <android.support.v4.widget.SwipeRefreshLayout android:id="@+id/profileSwipeRefreshLayout" android:layout_width="match_parent" android:layout_height="match_parent" > <!– RecyclerView and NestedScrollView –> <include layout="@layout/fragment_profile_details" /> </android.support.v4.widget.SwipeRefreshLayout> </android.support.design.widget.CoordinatorLayout> fragment_profile_details.xml : <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/rootLayout" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" […]

Linux的PID回收

Linux中有没有关于使用过的PID回收的政策? 我的意思是,如果一个PId被使用了,那么它又会被多less次使用呢?

如何防止修改web.config时重新启动ASP.NET应用程序?

我通过ApplicationHost.CreateApplicationHost方法托pipeASP.NET运行时。 当我在应用程序运行时修改web.config时,我看到很多第一次抛出ThreadAbortException的机会。 这是在我的应用程序崩溃之前。 我假设这是因为运行时检测到configuration的变化,并希望重新启动。 对于我们来说,这不是一个真正的支持场景,所以我更喜欢如果我可以closures自动重新加载。 有谁知道如何做到这一点?