define: DUK_OPT_EXTSTR_FREE introduced: 1.1.0 requires: - DUK_OPT_EXTERNAL_STRINGS tags: - memory - experimental description: > Optional counterpart to DUK_OPT_EXTSTR_INTERN_CHECK. Invoked when an external string is about to be freed by Duktape. The argument "ptr" is a void ptr and points to the external string data. Concretely, it is the (non-NULL) value returned by DUK_OPT_EXTSTR_INTERN_CHECK. The "udata" argument is the heap userdata which may be ignored if not needed. Also enable DUK_OPT_EXTERNAL_STRINGS to use this feature. NOTE: Right now there is no API to push external strings; external strings come into being as a result of DUK_OPT_EXTSTR_INTERN_CHECK() only. If/when this is changed, this hook will get called for every string, even if pushed by the user using an API call; this may need to be rethought at that time.