From 4a452dd15796086078d0378813dc13fe55225dc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Wed, 1 Mar 2017 10:36:29 +0100 Subject: [PATCH] Fix plugin cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The plugins were not getting cleaned up properly, so e.g. after a profile switch instances of the Plugin class would get piled up. This fixes commit 363d74815a. Signed-off-by: Ondřej Lysoněk --- tuned/units/manager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tuned/units/manager.py b/tuned/units/manager.py index ed83ba1..7d8a061 100644 --- a/tuned/units/manager.py +++ b/tuned/units/manager.py @@ -71,6 +71,9 @@ class Manager(object): for instance in self._instances: log.debug("destroying instance %s" % instance.name) instance.plugin.destroy_instance(instance) + for plugin in self._plugins: + log.debug("cleaning plugin '%s'" % plugin.name) + plugin.cleanup() del self._plugins[:] del self._instances[:]