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++
#3
(Jul-15-2020, 10:02 PM)Gribouillis Wrote: I don't know why there is a memory leak, but normal C programs call Py_Initialize() and Py_Finalize() only once. Why would anyone want to call them in a loop?

I've test on OS X 10.15 with python 3.8.3, there is a memory leak.
Do you mean that I should not using Py_Initialize and Py_Finalize in C function? so that I should not use them multi times?
Reply


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

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to run detectron2, as python embedded code in C++, on GPU? hassaniqbal931 3 1,241 Nov-02-2023, 04:45 PM
Last Post: blabling2
  Adding libraries to embedded Python as a ZIP The_Oman 0 1,330 May-05-2023, 04:05 PM
Last Post: The_Oman
  python list out top 10 Memory utilisation mg24 0 877 Nov-20-2022, 10:51 PM
Last Post: mg24
Bug Embedded Python Memory Leaks Alexei 1 1,112 Sep-16-2022, 01:15 PM
Last Post: Alexei
  Embedded Python in C++ Xeno 19 3,868 Aug-03-2022, 07:29 AM
Last Post: Gribouillis
  python memory rd_rakesh 1 1,708 Jul-14-2021, 11:15 AM
Last Post: jefsummers
  Where is the memory leak in this Flask Code? Morkus 1 5,802 Jun-18-2021, 02:48 PM
Last Post: Oliver
  Embedded python fails to compile on Raspberry Pi tryfon 2 3,606 Dec-22-2020, 02:06 PM
Last Post: tryfon
  Can Embedded Python run any shared library on Android ? sprotz 0 2,391 Nov-08-2020, 12:21 PM
Last Post: sprotz
  Windows Python Memory Scanner Awesometech 1 26,498 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