From f3d5ea926d4dd1a739b9d3816543728af723cc26 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Tue, 18 May 2010 18:43:51 -0700 Subject: [PATCH] Have LauncherModel poke the gc after it's done, to give the renderscript objects a chance to get deleted, since they aren't in the java heap. Bug 2685490 Change-Id: Ifff97b64585ac0f6faed0feb6362f6137682e32d --- src/com/android/launcher2/LauncherModel.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java index a8672008c5..6127649847 100644 --- a/src/com/android/launcher2/LauncherModel.java +++ b/src/com/android/launcher2/LauncherModel.java @@ -623,6 +623,14 @@ public class LauncherModel extends BroadcastReceiver { // sections. mLoaderThread = null; } + + // Trigger a gc to try to clean up after the stuff is done, since the + // renderscript allocations aren't charge to the java heap. + mHandler.post(new Runnable() { + public void run() { + System.gc(); + } + }); } public void stopLocked() {