diff --git a/modules/lwjgl/core/src/main/java/org/lwjgl/system/MemoryUtil.java b/modules/lwjgl/core/src/main/java/org/lwjgl/system/MemoryUtil.java index 0149fd6d8b..86dfafb1f5 100644 --- a/modules/lwjgl/core/src/main/java/org/lwjgl/system/MemoryUtil.java +++ b/modules/lwjgl/core/src/main/java/org/lwjgl/system/MemoryUtil.java @@ -354,6 +354,13 @@ public static void memFree(@Nullable Buffer ptr) { } } + /** {@code PointerBuffer} version of {@link #memFree}. */ + public static void memFree(@Nullable PointerBuffer ptr) { + if (ptr != null) { + nmemFree(ptr.address); + } + } + /** {@code CustomBuffer} version of {@link #memFree}. */ public static void memFree(@Nullable CustomBuffer ptr) { if (ptr != null) {