Skip to content

JavetProxyConverter and memory management #142

Answered by caoccao
Stechmuck asked this question in Q&A
Discussion options

You must be logged in to vote

The root cause of the potential memory leak is: global objects are not subject to GC.

The solution is as follows.

  • Use let, const instead of var.
  • Wrap the variable declaration in a function.

Why potential? Javet keeps track of every memory leak point and releases all of them when V8 runtime is being closed.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Stechmuck
Comment options

Answer selected by Stechmuck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants