Package com.jme3.opencl
Class AbstractOpenCLObject
java.lang.Object
com.jme3.opencl.AbstractOpenCLObject
- All Implemented Interfaces:
OpenCLObject
Abstract implementation of
OpenCLObject
providing the release
mechanisms.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jme3.opencl.OpenCLObject
OpenCLObject.ObjectReleaser
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
-
Method Summary
-
Field Details
-
releaser
-
-
Constructor Details
-
AbstractOpenCLObject
-
-
Method Details
-
register
Description copied from interface:OpenCLObject
Registers this object for automatic releasing on garbage collection. By default, OpenCLObjects are not registered in theOpenCLObjectManager
, you have to release it manually by callingOpenCLObject.release()
. Without registering or releasing, a memory leak might occur.
Returnsthis
to allow calls likeBuffer buffer = clContext.createBuffer(1024).register();
.- Specified by:
register
in interfaceOpenCLObject
- Returns:
this
-
release
public void release()Description copied from interface:OpenCLObject
Releases this native object. Should delegate togetReleaser().release()
.- Specified by:
release
in interfaceOpenCLObject
-
finalize
-
getReleaser
Description copied from interface:OpenCLObject
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.- Specified by:
getReleaser
in interfaceOpenCLObject
- Returns:
- the object releaser
-