summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorRaph Levien <raph@google.com>2014-05-15 02:03:48 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-15 02:03:48 +0000
commit9e2b288ba89ad78ba601eef4843831b382a17bd5 (patch)
tree34f7f6d613592a8fde35ce69e607e19551b4545d /graphics
parent018646adac62f137fe6b2ad04182cc623a7037e0 (diff)
parent15cf4757dc0099301662f8a26da561434cc07cfa (diff)
downloadframeworks_base-9e2b288ba89ad78ba601eef4843831b382a17bd5.zip
frameworks_base-9e2b288ba89ad78ba601eef4843831b382a17bd5.tar.gz
frameworks_base-9e2b288ba89ad78ba601eef4843831b382a17bd5.tar.bz2
Merge "Proper refcounting for Minikin objects"
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/FontFamily.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/graphics/java/android/graphics/FontFamily.java b/graphics/java/android/graphics/FontFamily.java
index 7c55ae8..a759a79 100644
--- a/graphics/java/android/graphics/FontFamily.java
+++ b/graphics/java/android/graphics/FontFamily.java
@@ -36,13 +36,21 @@ public class FontFamily {
throw new RuntimeException();
}
}
- // TODO: finalization
+
+ @Override
+ protected void finalize() throws Throwable {
+ try {
+ nUnrefFamily(mNativePtr);
+ } finally {
+ super.finalize();
+ }
+ }
public boolean addFont(File path) {
return nAddFont(mNativePtr, path.getAbsolutePath());
}
static native long nCreateFamily();
- static native void nDestroyFamily(long nativePtr);
+ static native void nUnrefFamily(long nativePtr);
static native boolean nAddFont(long nativeFamily, String path);
}