Are you continuously evaluating new bits of Ruby code?  Is each execution in 
its own ScriptScope?  In its own ScriptRuntime?


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aaron Clauson
Sent: Saturday, July 05, 2008 11:45 PM
To: [email protected]
Subject: Re: [Ironruby-core] Memory Leak with Certain Script Exceptions

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/.
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to