Description
JS_InternUCString creates a new, Unicode-encoded JS string with a specified value, s , if it does not already exist. The char array, s , must be allocated on the heap. The JS string is an interned, Unicode version of s , meaning that independent C variables that define a matching string will, when translated to a JS string value using JS_InternUCString , share the same internal copy of the JS string, rather than define their own, separate copies in memory. Use this function to save space allocation on the heap.
If it creates or reuses an interned string, JS_InternUCString returns a pointer to the string. Otherwise, on error, it returns NULL .
|