Python Forum
Memory leak in Py_Initialize on Windows
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Memory leak in Py_Initialize on Windows
#1
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.
Reply
#2
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
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
It is exactly that, sorry for the post but I search and did not find 32026.
Regards
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020