diff options
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/graphics/FontFamily.java | 12 |
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); } |