[libbluray-devel] Split destroy() from finalize()

hpi1 git at videolan.org
Tue May 21 16:07:31 CEST 2013


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue May 21 16:49:33 2013 +0300| [1fa58709b7f483a9b7e831aa70a030338fe1b5fd] | committer: hpi1

Split destroy() from finalize()

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=1fa58709b7f483a9b7e831aa70a030338fe1b5fd
---

 src/libbluray/bdj/java/java/awt/BDFontMetrics.java |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/libbluray/bdj/java/java/awt/BDFontMetrics.java b/src/libbluray/bdj/java/java/awt/BDFontMetrics.java
index aa597f9..8cc5ffb 100644
--- a/src/libbluray/bdj/java/java/awt/BDFontMetrics.java
+++ b/src/libbluray/bdj/java/java/awt/BDFontMetrics.java
@@ -53,7 +53,7 @@ public class BDFontMetrics extends FontMetrics {
                         try {
                             BDFontMetrics fm = (BDFontMetrics)it.next();
                             it.remove();
-                            fm.finalize();
+                            fm.destroy();
                         } catch (Throwable e) {
                             e.printStackTrace();
                         }
@@ -243,11 +243,15 @@ public class BDFontMetrics extends FontMetrics {
         return newWidths;
     }
 
-    protected void finalize() throws Throwable {
+    public void destroy() {
         if (ftFace != 0) {
             destroyFontN(ftFace);
             ftFace = 0;
         }
+    }
+
+    protected void finalize() throws Throwable {
+        destroy();
         super.finalize();
     }
 }



More information about the libbluray-devel mailing list