=proto duk_context *duk_create_heap_default(void); =summary

Create a new Duktape heap and return an initial context (thread). If heap initialization fails, a NULL is returned. There is currently no way to obtain more detailed error information.

The created heap will use default memory management and fatal error handler functions. This API call is equivalent to:

ctx = duk_create_heap(NULL, NULL, NULL, NULL, NULL);
=example duk_context *ctx; ctx = duk_create_heap_default(); if (ctx) { /* success */ /* ... after heap is no longer needed: */ duk_destroy_heap(ctx); } else { /* error */ } =tags heap