Hi there.
 
I am (like many) quite new to IronPython (and Python in general), but I am trying to use it as a scripting language for a MUD system I am creating (like the old text-based games, only multiplayer).
 
Now the scripts are executed and run very frequently (like when timers are executed, or when players type commands, etc).
 
The problem I have is that after about an hour of serving, my windows system goes out of virtual memory.  When I remove the references to IronPython and don't execute any scripts, the memory stays stable.
 
I am sure I am using the IronPython engine incorrectly, so I thought that maybe someone would be able to shed some light on this for me.
 
Here is the code I use to run a script (passed as a string to the c# method):
 

pythonEngine =

new PythonEngine ();
if (parameters != null)
{
  //Pass "parameters" to the script that will be executed
  foreach (PythonParameter pp in parameters)
  {
    pythonEngine.SetVariable(pp.Name, pp.Value);
//Variable name/variable value
  }
}
pythonEngine.Execute(pythonScript);

This is executed everytime any script must be executed.

Please let me know if you can spot anything wrong with this...

Regards,

Bernard

_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to