using uCalcSoftware;

var uc = new uCalc();
// A 'NewUsing' block ensures the expression is automatically released at the end of the scope.
// This is the safest pattern to prevent memory leaks.
using (var expr = new uCalc.Expression("5 * 10")) {
   Console.WriteLine($"Result within scope: {expr.Evaluate()}");
}

// The 'expr' object is now released and its handle is invalid.
Console.WriteLine("Expression has been automatically released.");