Question about Python objects in C++ - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27) +--- Thread: Question about Python objects in C++ (/showthread.php?tid=98051) |
Question about Python objects in C++ - Joerg.Liebner - 2011-03-29 Hi, i have a few questions: I am trying to share Python objects between different Python scripts. I save these Python objects in C++ variables, an then pass these objects to other scripts later. I do not understand, how garbage collection handles these objects. Does the Python interpreter destroy these objects each time, a script terminates? Can i prevent this? Do i have to make an INCREF or DECREF each time, this object is passed to another script? Please, can someone give me some clue? |