On OS X 10.5.3 the default python has a mild memory leak. sample session: % python -S Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin >>> % leaks Python Process 2357: 572 nodes malloced for 1031 KB Process 2357: 1 leak for 16 total leaked bytes. ...
I can reproduce this with the Apple-supplied Python, but I'm having trouble reproducing it with anything from python.org. I tried checking out revision 54863 and doing ./configure --enable-framework MACOSX_DEPLOYMENT_TARGET=10.3 && make sudo make altinstall Then I get: $ /usr/local/bin/python2.5 -S Python 2.5.1 (release25-maint:54863, Jun 30 2008, 22:59:07) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin $ leaks Python Process 84169: 534 nodes malloced for 1029 KB Process 84169: 0 leaks for 0 total leaked bytes. So maybe the leak is the result of something that Apple did?