[quickjs-devel] Re: DupValue / FreeValue for JS_UNDEFINED

  • From: Charlie Gordon <quickjs@xxxxxxxxxxx>
  • To: quickjs-devel@xxxxxxxxxxxxx
  • Date: Tue, 13 Aug 2019 23:43:07 +0200

JS_UNDEFINED as well as all non refcounted values (null, booleans, integers, 
exception...),  can be passed to JS_DupValue and JS_FreeValue harmlessly.
If you know a value is not refcounted, you can skip the calls too.

Chqrlie.

On 13 Aug 2019, at 23:32, Saúl Ibarra Corretgé <s@xxxxxxxxxx> wrote:

Hey there,

Is extra care (as in, do the calls to dup / free need to be balanced)
needed for JS_UNDEFINED or can one DupValue / FreeValue it without much
regard?


Cheers,

-- 
Saúl



Other related posts: