Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Correct ClearScript Cleanup

$
0
0
I have been using ClearScript in a Project for a while and have been using a simple cleanup operation of "engine.Dispose(); engine = null;"
Looking at your included "ClearScriptConsole" I notice you have a "using { }" and that is all.

So my question is what is the correct method to ensure all resources are Cleaned Up so that if I create the ClearScript engine several times I am not consuming resources.

My question stems from the assumption that I am doing something wrong as each iteration of the ClearScript engine that I execute results in a different engine.name value
eg 5 different calls of my "using { }" version of calling engine.Execute resulted in this below and I got the same using Dispose and also when adding GarbageCleanup(true).

Engine Name : V8ScriptEngine
Engine Name : V8ScriptEngine [2]
Engine Name : V8ScriptEngine [3]
Engine Name : V8ScriptEngine [4]
Engine Name : V8ScriptEngine [5]

Viewing all articles
Browse latest Browse all 2297

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>