name: duk_free_raw proto: | void duk_free_raw(duk_context *ctx, void *ptr); summary: |

Free memory allocated with the allocation function registered to the context. The operation cannot fail. If ptr is NULL, the call is a no-op.

duk_free_raw() can be used to free memory allocated with either duk_alloc() or duk_alloc_raw() and their reallocation variants.

example: | void *buf = duk_alloc_raw(ctx, 1024); /* ... */ duk_free_raw(ctx, buf); /* safe even if 'buf' is NULL */ tags: - memory seealso: - duk_free introduced: 1.0.0