[quickjs-devel] Re: JSValue management and GC questions

  • From: siney <sineysan@xxxxxxx>
  • To: <quickjs-devel@xxxxxxxxxxxxx>
  • Date: Tue, 21 Jan 2020 14:29:16 +0800

1)     Yes, you muse JS_FreeValue call arguments after JS_Call;

2)     Yes, you can use JS_DupValue to mark an object (inc referrence) and 
JS_FreeValue to (dec reference).

 

发件人: <quickjs-devel-bounce@xxxxxxxxxxxxx> 代表 JM <jeevhi@xxxxxxxxx>
答复: <quickjs-devel@xxxxxxxxxxxxx>
日期: 2020年1月21日 星期二 下午1:15
收件人: <quickjs-devel@xxxxxxxxxxxxx>
主题: [quickjs-devel] JSValue management and GC questions

 

Can someone clarify these

 

1) Does the number of arguments passed to JS_Call() needs to be freed after the 
execution or will it be freed by the JS_Call()

2) Does the object created by C APIs are subject to GC? if yes, is there a way 
to mark object from garbage collected

 

Thank you for providing insight. 

Other related posts: