define: DUK_USE_EXTSTR_FREE introduced: 1.1.0 requires: - DUK_USE_HSTRING_EXTDATA default: false tags: - memory - experimental description: > Optional counterpart to DUK_USE_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_USE_EXTSTR_INTERN_CHECK. The "udata" argument is the heap userdata which may be ignored if not needed. Also enable DUK_USE_HSTRING_EXTDATA to use this feature. NOTE: Right now there is no API to push external strings; external strings come into being as a resul of DUK_USE_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.