Chakracore: Clearing a context via JSRT API

Created on 26 Mar 2018  路  3Comments  路  Source: chakra-core/ChakraCore

Hi,

I hope this is the right place to ask this question, but anyways: I created a lot of contexts via the JSRT API and I am wondering how the memory and resources allocated for that context gets cleaned up. The JSRT API doesn't have anything like clear context. Is the context garbage collected?

Thanks for the answer...

Answered Question

All 3 comments

It is indeed garbage collected. As long as a context is not set as current context of the runtime or intentionally pinned through JsAddRef, GC will be able to collect it.

I just added a short note on this on our wiki.

Thanks for the answer :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

luxiao6620217 picture luxiao6620217  路  6Comments

kunalspathak picture kunalspathak  路  4Comments

d3x0r picture d3x0r  路  5Comments

valdrinkoshi picture valdrinkoshi  路  3Comments

YiWen-y picture YiWen-y  路  4Comments