Mercurial > libervia-backend
diff src/core/sat_main.py @ 416:32dc8b18c2ae
core: param loading/purging on profile connection/disconnection
- fixed default value in .*getParam.*
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 01 Nov 2011 22:59:15 +0100 |
parents | dd4caab17008 |
children | acd908528ef7 |
line wrap: on
line diff
--- a/src/core/sat_main.py Tue Nov 01 22:55:58 2011 +0100 +++ b/src/core/sat_main.py Tue Nov 01 22:59:15 2011 +0100 @@ -268,6 +268,15 @@ info(_("Disconnecting...")) self.profiles[profile].stopService() + def purgeClient(self, profile): + """Remove reference to a profile client and purge cache + the garbage collector can then free the memory""" + try: + del self.profiles[profile] + except KeyError: + error(_("Trying to remove reference to a client not referenced")) + self.memory.purgeProfile(profile) + def startService(self): info("Salut à toi ô mon frère !") #TODO: manage autoconnect