embedding Python: how to avoid memory leaks?
andrew at trevorrow.com
Thu Mar 9 13:03:18 CET 2006
> > Our app (http://golly.sourceforge.net/) currently uses calls
> > like these every time a user decides to run a script:
> > Py_Initialize();
> > PyRun_SimpleString("execfile('foo.py')");
> Does PyRun_AnyFile show the same effect? That's the way I'm about
> to go.
I couldn't get the PyRun_*File* calls to work on Windows, presumably
because of the FILE* problem mentioned in the docs.
I'll be very surprised if it makes any difference to the memory
leak problem. Let me know how you get on!
More information about the Python-list