Use Runtime.gc instead of System.gc for DDMS.

System.gc doesn't always do a GC unless to attempt to run the
finalizers after you call System.gc.

Bug: 14325353
Change-Id: Iebed7fad5576d610cea13a86e7d3d46652c67478
This commit is contained in:
Mathieu Chartier
2014-04-28 10:16:17 -07:00
parent 3f4867f49d
commit 83f7d0d67f

View File

@@ -219,7 +219,7 @@ public class DdmHandleHeap extends ChunkHandler {
if (false)
Log.d("ddm-heap", "Heap GC request");
System.gc();
Runtime.getRuntime().gc();
return null; // empty response
}