#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;

   // The NewUsing block ensures the object's destructor calls Release().
   {
      uCalc scopedCalc;
      scopedCalc.Owned(); // Causes scopedCalc to be released when it goes out of scope
      scopedCalc.DefineVariable("val = 100");
      cout << "Inside C++ scope: " << scopedCalc.Eval("val") << endl;
   } // scopedCalc's destructor calls Release() here.
   cout << "Outside C++ scope, instance is released." << endl;


}