[libbluray-devel] BDFramePeer: dispose Graphics object after use

hpi1 git at videolan.org
Thu Apr 24 11:32:35 CEST 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Apr 24 10:26:17 2014 +0300| [913b143f8ec680fb049a3d690447050d5eda26ad] | committer: hpi1

BDFramePeer: dispose Graphics object after use

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

 src/libbluray/bdj/java-j2se/java/awt/peer/BDFramePeer.java |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/libbluray/bdj/java-j2se/java/awt/peer/BDFramePeer.java b/src/libbluray/bdj/java-j2se/java/awt/peer/BDFramePeer.java
index 48835d6..6c19da3 100644
--- a/src/libbluray/bdj/java-j2se/java/awt/peer/BDFramePeer.java
+++ b/src/libbluray/bdj/java-j2se/java/awt/peer/BDFramePeer.java
@@ -177,7 +177,9 @@ public class BDFramePeer extends BDComponentPeer implements FramePeer
     public void setVisible(boolean b) {
         //Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(new WindowEvent((Frame)component, WindowEvent.WINDOW_ACTIVATED));
         if (b == true) {
-            component.paint(getGraphics());
+            Graphics g = getGraphics();
+            component.paint(g);
+            g.dispose();
         }
     }
 



More information about the libbluray-devel mailing list