[Ironruby-core] Memory Leak with Certain Script Exceptions
Aaron Clauson
lists at ruby-forum.com
Sun Jul 6 02:45:11 EDT 2008
Tomas Matousek wrote:
> What does the script look like?
Hi Tomas,
The Ruby script could be a single line such as:
sys.DoMethod(1, 2, 3)
Where sys is an object from a custom .Net class that has been loaded and
executed as:
ScriptRuntime scriptRuntime = IronRuby.CreateRuntime();
ScriptScope rubyScope = scriptRuntime.CreateScope("IronRuby");
DialPlanHelper helper = new DialPlanHelper();
rubyScope.SetVariable("sys", helper);
rubyScope.Execute("sys.DoMethod(1, 2, 3)");
If the DoMethod is called with the correct parameters it works fine,
however if the wrong number of arguments are provided a
System.ArgumentOutOfRangeException is thrown and the memory leak occurs.
Regards,
Aaron
--
Posted via http://www.ruby-forum.com/.
More information about the Ironruby-core
mailing list