From 826dacffbae941a35a7cc74515751ddb1d5711a2 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Sun, 19 Jun 2011 22:31:05 +0200 Subject: - added isReleased() to CLResource, made CLObject public. - a CLResource will throw an Exception if released twice. --- src/com/jogamp/opencl/CLMemory.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/com/jogamp/opencl/CLMemory.java') diff --git a/src/com/jogamp/opencl/CLMemory.java b/src/com/jogamp/opencl/CLMemory.java index d87129a4..0edfb7e2 100644 --- a/src/com/jogamp/opencl/CLMemory.java +++ b/src/com/jogamp/opencl/CLMemory.java @@ -47,7 +47,7 @@ import static com.jogamp.opencl.llb.gl.CLGL.*; * Represents an OpenCL memory object and wraps an optional NIO buffer. * @author Michael Bien */ -public abstract class CLMemory extends CLObject implements CLResource { +public abstract class CLMemory extends CLObjectResource { B buffer; protected final int FLAGS; @@ -222,6 +222,7 @@ public abstract class CLMemory extends CLObject implements CL @Override public void release() { + super.release(); int ret = binding.clReleaseMemObject(ID); context.onMemoryReleased(this); if(ret != CL_SUCCESS) { -- cgit v1.2.3