I am using Mathematica from .NET (C#) to compute the result based on some input, following is the code snippet of C#
using (var mathKernel = new MathKernel())
{
mathKernel.Compute("PDF[NormalDistribution[-5, 3], x]");
if (mathKernel.Result != null)
{
var response = mathKernel.Result.ToString();
}
}
above code is called after every minute, upon calling a process named "MathKernel.exe" is created every time, occupy approx. 100 MB of RAM and it does not exit after execution of above code.
MathKernel instance is created in using block which is supposed to dispose after end of closing bracket.
Is there something which I am missing?