Ref count oddness with embedded Python... memory leak?

Ben Sizer kylotan at gmail.com
Thu Jan 11 13:16:39 CET 2007


Here's my test-case:

#include <python.h>
int main(int argc, char *argv[])
{
	Py_Initialize(); Py_Finalize();
	Py_Initialize(); Py_Finalize();
	Py_Initialize(); Py_Finalize();
	Py_Initialize(); Py_Finalize();
	Py_Initialize(); Py_Finalize();
	return 1;
}

Here's my output, with Python 2.5 built in debug mode on WinXP, no
modifications:

[7438 refs]
[7499 refs]
[7550 refs]
[7601 refs]
[7652 refs]

Is this normal? It doesn't look very promising to me.

-- 
Ben Sizer




More information about the Python-list mailing list