mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
883 B
23 lines
883 B
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 result 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.
|
|
|