Memory leaks whilst embedding python
Gordon McMillan
gmcm at hypernet.com
Sat Jul 24 00:33:10 EDT 1999
Chris Williamson discovers that:
> Py_Initialize();
> Py_Finalize();
leaks.
Well, if MSVC reported on all of MFC's static allocations, you'd see
that it leaks, too.
These are nothing to worry about. It's static data that Python needs
to run. It won't continually grow. If you use the debug memory stuff,
you should take your checkpoint after Py_Initialize and report before
Py_Finalize. In fact, you should probably take your checkpoint after
you've done your imports, because a lot of the memory they use won't
get released until Py_Finalize.
- Gordon
More information about the Python-list
mailing list