Python Forum

Full Version: Memory leak in Py_Initialize on Windows
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The following simple program shows a lot of memory leaks in Py_Initialize (python 3.7.3) on windows:

int main(int argc, char** argv)
{
//wchar_t *program = Py_DecodeLocale(argv[0], NULL);
//Py_SetProgramName(program);
Py_Initialize();
std::cout << "Py_IsInitialized returned " << Py_IsInitialized() << std::endl;
Py_FinalizeEx();
// PyMem_RawFree(program);
_CrtDumpMemoryLeaks();
}

I can provide the visual studio 2017 project instrumented to track the leaks but don't know where to post it.
Who are we?

if you believe you have found bug - https://bugs.python.org/
Make sure to check open issues regarding Py_Initialize memory leak - e.g. https://bugs.python.org/issue32026
It is exactly that, sorry for the post but I search and did not find 32026.
Regards