[libbluray-devel] BDFontMetrics: "fix" finalize

hpi1 git at videolan.org
Sun Mar 23 12:02:11 CET 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sun Mar 23 12:46:47 2014 +0200| [e2f5f5dc08c0af158c09eff7eb0f65b11591de00] | committer: hpi1

BDFontMetrics: "fix" finalize

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

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

diff --git a/src/libbluray/bdj/java/java/awt/BDFontMetrics.java b/src/libbluray/bdj/java/java/awt/BDFontMetrics.java
index 5666fc0..f1c636c 100644
--- a/src/libbluray/bdj/java/java/awt/BDFontMetrics.java
+++ b/src/libbluray/bdj/java/java/awt/BDFontMetrics.java
@@ -255,7 +255,12 @@ public class BDFontMetrics extends FontMetrics {
     }
 
     protected void finalize() throws Throwable {
-        destroy();
-        super.finalize();
+        try {
+            destroy();
+        } catch (Throwable t) {
+            throw t;
+        } finally {
+            super.finalize();
+        }
     }
 }



More information about the libbluray-devel mailing list