aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLMemory.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/jogamp/opencl/CLMemory.java')
-rw-r--r--src/com/jogamp/opencl/CLMemory.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/jogamp/opencl/CLMemory.java b/src/com/jogamp/opencl/CLMemory.java
index 55a04af9..aac76790 100644
--- a/src/com/jogamp/opencl/CLMemory.java
+++ b/src/com/jogamp/opencl/CLMemory.java
@@ -147,7 +147,9 @@ public abstract class CLMemory <B extends Buffer> extends CLObject implements CL
public void release() {
int ret = cl.clReleaseMemObject(ID);
context.onMemoryReleased(this);
- checkForError(ret, "can not release mem object");
+ if(ret != CL_SUCCESS) {
+ throw newException(ret, "can not release "+this);
+ }
}
public void close() {
@@ -203,7 +205,7 @@ public abstract class CLMemory <B extends Buffer> extends CLObject implements CL
@Override
public String toString() {
- return "CLMemory [id: " + ID+"]";
+ return getClass().getSimpleName()+" [id: " + ID+"]";
}
/**