[libbluray-devel] Release defaultHScene in HSceneFactory

hpi1 git at videolan.org
Sat Mar 30 01:39:08 CET 2013


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sat Mar 16 14:13:19 2013 +0200| [7033278a31dd2240b9652ce3b081e75fc3f314a2] | committer: hpi1

Release defaultHScene in HSceneFactory

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

 src/libbluray/bdj/java/org/havi/ui/HSceneFactory.java |   11 +++++++++++
 src/libbluray/bdj/java/org/videolan/Libbluray.java    |    1 +
 2 files changed, 12 insertions(+)

diff --git a/src/libbluray/bdj/java/org/havi/ui/HSceneFactory.java b/src/libbluray/bdj/java/org/havi/ui/HSceneFactory.java
index 7228269..b09c6d4 100644
--- a/src/libbluray/bdj/java/org/havi/ui/HSceneFactory.java
+++ b/src/libbluray/bdj/java/org/havi/ui/HSceneFactory.java
@@ -89,6 +89,17 @@ public class HSceneFactory extends Object {
         GUIManager.getInstance().remove(scene);
     }
 
+    public void dispose() {
+        synchronized(HSceneFactory.class) {
+            dispose(defaultHScene);
+            defaultHScene = null;
+        }
+    }
+
+    public static void shutdown() {
+        instance.dispose();
+    }
+
     private HScene defaultHScene = null;
     private static final HSceneFactory instance = new HSceneFactory();
 }
diff --git a/src/libbluray/bdj/java/org/videolan/Libbluray.java b/src/libbluray/bdj/java/org/videolan/Libbluray.java
index 3f012f2..376d9d9 100644
--- a/src/libbluray/bdj/java/org/videolan/Libbluray.java
+++ b/src/libbluray/bdj/java/org/videolan/Libbluray.java
@@ -125,6 +125,7 @@ public class Libbluray {
             BDJLoader.shutdown();
             BDJActionManager.getInstance().finalize();
             MountManager.unmountAll();
+            org.havi.ui.HSceneFactory.shutdown();
         } catch (Throwable e) {
             e.printStackTrace();
         }



More information about the libbluray-devel mailing list