Hello,
I run code JScript From VB but i have memory problem increase:
I have use JScriptCodeProvider:
Dim provider As Microsoft.JScript.JScriptCodeProvider
Dim compiler As System.CodeDom.Compiler.ICodeCompiler
Dim params As System.CodeDom.Compiler.CompilerParameters
Dim results As System.CodeDom.Compiler.CompilerResults
params = New System.CodeDom.Compiler.CompilerParameters()
params.GenerateInMemory = True 'Assembly is created in memory
params.TreatWarningsAsErrors = False
params.WarningLevel = 4
params.GenerateExecutable = False
params.IncludeDebugInformation = False
Dim refs() As String = {"System.dll", "Microsoft.VisualBasic.dll"}
params.ReferencedAssemblies.AddRange(refs)
provider = Microsoft.JScript.JScriptCodeProvider()
compiler = provider.CreateCompiler
results = compiler.CompileAssemblyFromSource(params,
txtCode.Text)
mAssembly = results.CompiledAssembly
How I release memory.
I have use olso Microsoft.JScript.Vsa.VsaEngine with analog problem
Thank Danilo
P.S. I don't want use new appDomain because in the code there are reference
with my istance of object (not serializable)