May-02-2019, 11:10 AM
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.
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.