[IronPython] IP as a Macro Language

Curt Hagenlocher curt at hagenlocher.org
Fri Apr 18 16:48:52 CEST 2008


On Fri, Apr 18, 2008 at 2:00 AM, Dave Moor <d.moor at sim-soft.co.uk> wrote:
>
> My problem is, I can create a form entirely in IP but I can't seem to
> get it added as a MDIChild to the main application, and when the form is
> closed the form's timer is still running in the background requesting
> data from the main application.

For the most part, anything you can do along these lines from C# can
also be done from within IronPython.  Can you provide a snippet of
Python code that shows the approach that wasn't working for you?

> I gather from this list that IP has problems destroying C# objects it
> has instantiated and I assume that it has problems responding to events
> triggered from the CLR side.

Both IronPython and C# rely on the same underlying CLR garbage
collector, so there really shouldn't be any difference in this regard.
 Could you be storing a reference to the form from Python code which
would prevent garbage collection?  For instance, if you assign the
form to a module-level variable, it will probably never be destroyed
because the module itself is kept alive by a reference from
sys.modules.

--
Curt Hagenlocher
curt at hagenlocher.org



More information about the Ironpython-users mailing list