Преглед на файлове

ui:preview Removed useless call to System.gc().

Calling System.gc() or Runtime.getRuntime().gc() is a bad idea for a simple reason: there is no way to know exactly what will be done under the hood by the JVM because the behavior will depend on its vendor, version and options.
eho преди 6 години
родител
ревизия
f0b31af089
променени са 1 файла, в които са добавени 0 реда и са изтрити 1 реда
  1. 0 1
      src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java

+ 0 - 1
src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java

@@ -460,7 +460,6 @@ public class PreviewImageFragment extends FileFragment {
     public void onDestroy() {
         if (mBitmap != null) {
             mBitmap.recycle();
-            System.gc();
             // putting this in onStop() is just the same; the fragment is always destroyed by
             // {@link FragmentStatePagerAdapter} when the fragment in swiped further than the
             // valid offscreen distance, and onStop() is never called before than that