mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
reduce memory leak on control unit change
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -321,6 +321,8 @@ def apply_control(field):
|
||||
)
|
||||
shared.log.debug(f'XYZ grid apply control: {field}="{x}" unit={unit}')
|
||||
if len(run.unit.current) > 0:
|
||||
if hasattr(run.unit.current[0], 'reset'):
|
||||
run.unit.current[0].reset()
|
||||
run.unit.current[0] = unit
|
||||
else:
|
||||
run.unit.current = [unit]
|
||||
|
||||
Reference in New Issue
Block a user