Class GLFWReallocateCallback
- java.lang.Object
-
- org.lwjgl.system.Callback
-
- org.lwjgl.glfw.GLFWReallocateCallback
-
- All Implemented Interfaces:
java.lang.AutoCloseable,GLFWReallocateCallbackI,org.lwjgl.system.CallbackI,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public abstract class GLFWReallocateCallback extends org.lwjgl.system.Callback implements GLFWReallocateCallbackI
The function pointer type for memory reallocation callbacks.This is the function pointer type for memory reallocation callbacks. A memory reallocation callback function has the following signature:
void* function_name(void* block, size_t size, void* user)This function must return a memory block at least
sizebytes long, orNULLif allocation failed. Note that not all parts of GLFW handle allocation failures gracefully yet.This function may be called during
Initbut before the library is flagged as initialized, as well as duringTerminateafter the library is no longer flagged as initialized.Any memory allocated by this function will be deallocated during library termination or earlier.
The block address will never be
NULLand the size will always be greater than zero. Reallocations of a block to size zero are converted into deallocations. Reallocations ofNULLto a non-zero size are converted into regular allocations.Note
- The returned memory block must be valid at least until it is deallocated.
- This function should not call any GLFW function.
- This function may be called from any thread that calls GLFW functions.
Type
void * (*GLFWReallocateCallbackI.invoke(long, long, long)) ( void *block, size_t size, void *user )- Since:
- version 3.4
-
-
Field Summary
-
Fields inherited from interface org.lwjgl.glfw.GLFWReallocateCallbackI
CIF
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GLFWReallocateCallbackcreate(long functionPointer)Creates aGLFWReallocateCallbackinstance from the specified function pointer.static GLFWReallocateCallbackcreate(GLFWReallocateCallbackI instance)Creates aGLFWReallocateCallbackinstance that delegates to the specifiedGLFWReallocateCallbackIinstance.static GLFWReallocateCallbackcreateSafe(long functionPointer)-
Methods inherited from class org.lwjgl.system.Callback
address, equals, free, free, get, getSafe, hashCode, toString
-
Methods inherited from interface org.lwjgl.glfw.GLFWReallocateCallbackI
callback, getCallInterface, invoke
-
-
-
-
Method Detail
-
create
public static GLFWReallocateCallback create(long functionPointer)
Creates aGLFWReallocateCallbackinstance from the specified function pointer.- Returns:
- the new
GLFWReallocateCallback
-
createSafe
@Nullable public static GLFWReallocateCallback createSafe(long functionPointer)
-
create
public static GLFWReallocateCallback create(GLFWReallocateCallbackI instance)
Creates aGLFWReallocateCallbackinstance that delegates to the specifiedGLFWReallocateCallbackIinstance.
-
-