You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Python bindings with libcec in a long-running process, a memory leak can be observed.
The leak seems to have something to do with the logging function, as there is no leak if no log callback is configured.
Using libcec 7.0.0, Python 3.11.2
Minimal code example:
import cec
import time
def libcec_log(level, time, message):
return 0
libcec_config = cec.libcec_configuration()
libcec_config.bActivateSource = 0
libcec_config.deviceTypes.Add(cec.CEC_DEVICE_TYPE_RECORDING_DEVICE)
libcec_config.clientVersion = cec.LIBCEC_VERSION_CURRENT
# Adding the line below triggers memory leak
libcec_config.SetLogCallback(libcec_log)
lib = cec.ICECAdapter.Create(libcec_config)
adapters = lib.DetectAdapters()
lib.Open(adapters[0].strComName)
while True:
time.sleep(1)
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
When using Python bindings with libcec in a long-running process, a memory leak can be observed.
The leak seems to have something to do with the logging function, as there is no leak if no log callback is configured.
Using libcec 7.0.0, Python 3.11.2
Minimal code example:
The text was updated successfully, but these errors were encountered: