diff options
author | Carl Shapiro <cshapiro@google.com> | 2010-02-24 00:14:23 -0800 |
---|---|---|
committer | Carl Shapiro <cshapiro@google.com> | 2010-02-25 16:42:28 -0800 |
commit | 82fe564267f276151063b2aa0d26075c3210d75f (patch) | |
tree | cd0a77fa4ac1d0c4fc33924d4a9485440ad163b1 /core/java/android/app/Activity.java | |
parent | 4bb79db462a65381e85715da582bdd7fe278fd52 (diff) | |
download | frameworks_base-82fe564267f276151063b2aa0d26075c3210d75f.zip frameworks_base-82fe564267f276151063b2aa0d26075c3210d75f.tar.gz frameworks_base-82fe564267f276151063b2aa0d26075c3210d75f.tar.bz2 |
Comment out the finalize() methods defined on the Activity,
ContextImpl, View and ViewRoot classes. This allows instances of
subclasses to be collected without the additional latency of
finalization.
Diffstat (limited to 'core/java/android/app/Activity.java')
-rw-r--r-- | core/java/android/app/Activity.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index b38aeda..8695598 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -678,17 +678,19 @@ public class Activity extends ContextThemeWrapper private Thread mUiThread; private final Handler mHandler = new Handler(); + // Used for debug only + /* public Activity() { ++sInstanceCount; } - @Override protected void finalize() throws Throwable { super.finalize(); --sInstanceCount; } - + */ + public static long getInstanceCount() { return sInstanceCount; } |