Python Forum
memory leak on embedded python in c++
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
memory leak on embedded python in c++
#1
why this line cause memory?
how do I solve it

void cyc()
{
Py_Initialize();


PyObject *pArgs = Py_BuildValue("idd",4,1.0,1.0);

Py_DECREF(pArgs);


Py_Finalize(); //memory leak why?
}

int main()
{
for(;;)
{cyc();}
}
Reply


Messages In This Thread
memory leak on embedded python in c++ - by asdf3721 - Jul-15-2020, 07:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to run detectron2, as python embedded code in C++, on GPU? hassaniqbal931 3 1,081 Nov-02-2023, 04:45 PM
Last Post: blabling2
  Adding libraries to embedded Python as a ZIP The_Oman 0 1,224 May-05-2023, 04:05 PM
Last Post: The_Oman
  python list out top 10 Memory utilisation mg24 0 800 Nov-20-2022, 10:51 PM
Last Post: mg24
Bug Embedded Python Memory Leaks Alexei 1 1,022 Sep-16-2022, 01:15 PM
Last Post: Alexei
  Embedded Python in C++ Xeno 19 3,518 Aug-03-2022, 07:29 AM
Last Post: Gribouillis
  python memory rd_rakesh 1 1,640 Jul-14-2021, 11:15 AM
Last Post: jefsummers
  Where is the memory leak in this Flask Code? Morkus 1 5,560 Jun-18-2021, 02:48 PM
Last Post: Oliver
  Embedded python fails to compile on Raspberry Pi tryfon 2 3,461 Dec-22-2020, 02:06 PM
Last Post: tryfon
  Can Embedded Python run any shared library on Android ? sprotz 0 2,305 Nov-08-2020, 12:21 PM
Last Post: sprotz
  Windows Python Memory Scanner Awesometech 1 21,095 Oct-14-2020, 07:44 AM
Last Post: badengagen

Forum Jump:

User Panel Messages

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