diff options
author | Jeff Sharkey <jsharkey@android.com> | 2014-06-19 16:17:03 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-06-19 16:17:03 +0000 |
commit | 65dfc83cef6dd936deef428f1d318d10ff1d7af5 (patch) | |
tree | 873f64f1336c8c358aa6a980523f6896be3ea0e5 | |
parent | 45b161d24d82ef1df3ff854a1d97db0c9bad187a (diff) | |
parent | b9a45aae8d07e7a92806b53cbc36f5488e3bac2d (diff) | |
download | frameworks_base-65dfc83cef6dd936deef428f1d318d10ff1d7af5.zip frameworks_base-65dfc83cef6dd936deef428f1d318d10ff1d7af5.tar.gz frameworks_base-65dfc83cef6dd936deef428f1d318d10ff1d7af5.tar.bz2 |
am b9a45aae: am 447b68e7: am b5e05cff: Merge "Fixing parcel leaks to avoid virtual memory leak"
* commit 'b9a45aae8d07e7a92806b53cbc36f5488e3bac2d':
Fixing parcel leaks to avoid virtual memory leak
-rw-r--r-- | core/java/android/app/ApplicationThreadNative.java | 1 | ||||
-rw-r--r-- | core/java/android/widget/RemoteViews.java | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java index ef4099f..5998d7a 100644 --- a/core/java/android/app/ApplicationThreadNative.java +++ b/core/java/android/app/ApplicationThreadNative.java @@ -1184,6 +1184,7 @@ class ApplicationThreadProxy implements IApplicationThread { data.writeInt(level); mRemote.transact(SCHEDULE_TRIM_MEMORY_TRANSACTION, data, null, IBinder.FLAG_ONEWAY); + data.recycle(); } public void dumpMemInfo(FileDescriptor fd, Debug.MemoryInfo mem, boolean checkin, diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java index f7d20b53..82637a1 100644 --- a/core/java/android/widget/RemoteViews.java +++ b/core/java/android/widget/RemoteViews.java @@ -1781,7 +1781,9 @@ public class RemoteViews implements Parcelable, Filter { Parcel p = Parcel.obtain(); writeToParcel(p, 0); p.setDataPosition(0); - return new RemoteViews(p); + RemoteViews rv = new RemoteViews(p); + p.recycle(); + return rv; } public String getPackage() { |