XBMC AddOn Memory leak -


class = "post-text" itemprop = "text">

My XBMC AddOn produces a lot of log alerts about potential memory leaks:

13: 49:02 T: 139712465467136 Warning: CPythonInvoker (12, /home/test/.xbmc/addons/script.testplugin/default.py): Python Script "/home/test/.xbmc/addons/script.testplugin/default. py "has many sections such as could not we clean left sections in memory: N14PythonBindings42XBMCAddon_xbmcgui_WindowXMLDialog_DirectorE, N9XBMCAddon7xbmcgui12ControlLabelE, N9XBMCAddon7xbmcgui12ControlLabelE, N9XBMCAddon7xbmcgui8ListItemE

what causes this warning

Did you make and use the sub-category of XBMCDonAdon class in your plug-in code?

It seems that there might be a problem in clearing the sub-sections of Cody / XBMC XB.M.Cidon.Adon class. I saw that as soon as I make an example of such subclass, I start receiving warning messages from CPYthonInvoker which is similar to yours.

sys.getrefcount (instanceOfMySubclass) <4> gives me the reference is made immediately after an incident of my subclass. Clearly removing the subclass with del has removed a reference to the subclass from the current scope, but it is not clear if it also removes the other 3 references, perhaps there are other references that are CPythonInvoker "complains about many sections in memory that we can not clean".

In my case, as soon as I stopped using sub-sections of XBMCDon. Adon warning messages disappeared.


Comments