[IronPython] Python Memory Usage
bernardgraham at gmail.com
Sat Jan 7 16:51:35 CET 2006
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#
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
This is executed everytime any script must be executed.
Please let me know if you can spot anything wrong with this...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironpython-users