Re: [IronPython] Memory leaks in Ipy 2.6

2009-12-28 Thread Idan Zaltzberg
Unless I'm missing something, it seems calling close doesn’t solve the problem *From:* users-boun...@lists.ironpython.com [mailto: users-boun...@lists.ironpython.com] *On Behalf Of *Dino Viehland *Sent:* Tuesday, December 29, 2009 8:36 AM *To:* Discussion of IronPython *Subject:* Re: [IronPython

Re: [IronPython] Memory leaks in Ipy 2.6

2009-12-28 Thread Dino Viehland
2.6.1 is when it should be fixed which should be sometime early next year. A better workaround might be to avoid try/except in the generator if you can refactor that out into its own function. But if that doesn't work then I also think calling close explicitly should avoid it and do so without

Re: [IronPython] Memory leaks in Ipy 2.6

2009-12-28 Thread Idan Zaltzberg
Thanks for the fast reply. Could you estimate when and how (in what version) the fix will be deployed? Regardless, our current fix is to "throw" exception when we want the generator to be disposed and catch it ourselves, is that the right way to go? *From:* users-boun...@lists.ironpython.com [

Re: [IronPython] Memory leaks in Ipy 2.6

2009-12-28 Thread Dino Viehland
This is definitely a bug - we're leaking our stack frames on the CLR's finalizer thread when we swallow exceptions while closing the generator. I think this is the correct fix but I haven't fully tested it yet, in our generator we have the code below but it's missing the assignment of null to

Re: [IronPython] (UPDATE) Cannot create instances of RuntimeType because it has no public constructors

2009-12-28 Thread Marcel Heing-Becker
Thanks, this seems to work. This exposes my whole namepsace to IronPython but I think, it seems to be sufficiant to mark classes and types that must stay off this scope with 'internal'. 2009/12/28 Curt Hagenlocher > "fooclass" is not a Python type. It's an instance of the CLR class > System.Runt

Re: [IronPython] (UPDATE) Cannot create instances of RuntimeType because it has no public constructors

2009-12-28 Thread Curt Hagenlocher
"fooclass" is not a Python type. It's an instance of the CLR class System.RuntimeType. In order to derive from "foo" in this fashion, you might be able to turn fooclass into a IronPython.Runtime.Types.PythonType by saying import clr foo = clr.GetPythonType(fooclass) class bar(foo): pass If it

[IronPython] Memory leaks in Ipy 2.6

2009-12-28 Thread Idan Zaltzberg
Hi, Working with the new version I have encountered some problems which look like memory leaks to me. I've written 3 test methods that reproduce the problems, and would appreciate your response. Thanks *Problem 1* Occurs when you do the all of the following 1. Define a generator method

[IronPython] (UPDATE) Cannot create instances of RuntimeType because it has no public constructors

2009-12-28 Thread Marcel Heing-Becker
PLEASE IGNORE MY PREVIOUS POST with the same title, I accidentally sent it before I was finished cleaning up the code. Hi there, I have a problem with my application. It's written in C# and embeds IronPython. In C#, I have a class that looks like this: public class foo { public foo() {

[IronPython] Cannot create instances of RuntimeType because it has no public constructors

2009-12-28 Thread Marcel Heing-Becker
Hi there, I have a problem with my application. It's written in C# and embeds IronPython. In C#, I have a class that looks like this: public class foo { public foo() { ... } ... } I put this into the ScriptScope I use by doing: scope.SetVariable("fooclass", typeof(foo));