Package com.jme3.opencl
Interface OpenCLObject
- All Known Implementing Classes:
AbstractOpenCLObject
,Buffer
,CommandQueue
,Context
,Event
,Image
,Kernel
,LwjglBuffer
,LwjglCommandQueue
,LwjglContext
,LwjglEvent
,LwjglImage
,LwjglKernel
,LwjglProgram
,Program
public interface OpenCLObject
Base interface of all native OpenCL objects.
This interface provides the functionality to safely release the object.
-
Nested Class Summary
-
Method Summary
-
Method Details
-
getReleaser
OpenCLObject.ObjectReleaser getReleaser()Returns the releaser object. Multiple calls should return the same object. The ObjectReleaser is used to release the OpenCLObject when it is garbage collected. Therefore, the returned object must not hold a reference to the OpenCLObject.- Returns:
- the object releaser
-
release
void release()Releases this native object. Should delegate togetReleaser().release()
. -
register
OpenCLObject register()Registers this object for automatic releasing on garbage collection. By default, OpenCLObjects are not registered in theOpenCLObjectManager
, you have to release it manually by callingrelease()
. Without registering or releasing, a memory leak might occur.
Returnsthis
to allow calls likeBuffer buffer = clContext.createBuffer(1024).register();
.- Returns:
this
-