Browse Source

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 years ago
parent
commit
f0b31af089

+ 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