[cairo-commit] cairo-java/src/java/org/freedesktop/cairo TextExtents.java, 1.3, 1.4

Jeffrey Morgan commit at pdx.freedesktop.org
Mon Apr 11 16:44:07 PDT 2005


Committed by: kuzman

Update of /cvs/cairo/cairo-java/src/java/org/freedesktop/cairo
In directory gabe:/tmp/cvs-serv19583/src/java/org/freedesktop/cairo

Modified Files:
	TextExtents.java 
Log Message:
Fixed finalize to ensure resources are freed

Index: TextExtents.java
===================================================================
RCS file: /cvs/cairo/cairo-java/src/java/org/freedesktop/cairo/TextExtents.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- TextExtents.java	24 Mar 2005 18:11:40 -0000	1.3
+++ TextExtents.java	11 Apr 2005 23:44:05 -0000	1.4
@@ -42,8 +42,12 @@
 	}
 	
 	protected void finalize() throws Throwable {
-		free(getHandle());
-		super.finalize();
+		try {
+			free(getHandle());
+		} 
+		finally {
+			super.finalize();
+		}
 	}
 
 	/*




More information about the cairo-commit mailing list